runtime: normalize structured secret errors

This commit is contained in:
a.tolmachev
2026-04-19 21:25:28 +00:00
parent 899440fd8a
commit 5debf4dd05
7 changed files with 85 additions and 25 deletions
+2 -2
View File
@@ -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(", ")
),