runtime: normalize structured secret errors
This commit is contained in:
@@ -92,7 +92,7 @@ fn extract_secret_string(
|
||||
let Some(object) = value.as_object() else {
|
||||
return Err(RuntimeError::InvalidAuthSecretValue {
|
||||
secret_id: secret_id.as_str().to_owned(),
|
||||
details: "secret payload must be a string or object".to_owned(),
|
||||
reason: "secret payload must be a string or object".to_owned(),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ fn extract_secret_string(
|
||||
|
||||
Err(RuntimeError::InvalidAuthSecretValue {
|
||||
secret_id: secret_id.as_str().to_owned(),
|
||||
details: format!(
|
||||
reason: format!(
|
||||
"secret payload must contain one of: {}",
|
||||
preferred_fields.join(", ")
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user