Skip to main content

format_generic_error

Function format_generic_error 

Source
pub fn format_generic_error(error: &str) -> Value
Expand description

Build a generic JSON error body with a custom error string.

Returns { "error": "<error>" }.

Internally constructs an ErrorBody and serializes it.