pub trait ResponseErrorExt {
// Required method
fn into_response(self) -> Response;
}Expand description
Extension trait for converting objectiveai::error::ResponseError into Axum responses.
Required Methods§
Sourcefn into_response(self) -> Response
fn into_response(self) -> Response
Converts this error into an Axum HTTP response.
The response status code is derived from the error’s code field,
falling back to 500 Internal Server Error if the code is invalid.
The response body is the JSON-serialized error.
Implementations on Foreign Types§
Source§impl ResponseErrorExt for ResponseError
Available on non-WebAssembly only.
impl ResponseErrorExt for ResponseError
Available on non-WebAssembly only.