pub fn json_error_response_with_fields(
status: StatusCode,
code: &str,
message: &str,
extra_fields: &[(String, String)],
) -> (StatusCode, String, Bytes)Expand description
Build an AWS JSON error response carrying additional top-level members (e.g.
DynamoDB’s ConditionalCheckFailedException.Item). Each field value is
parsed as JSON when possible (so an object/array is embedded as-is) and
otherwise emitted as a JSON string.