fix(secret): log an error when a secret reference cannot be resolved (#13737)