awred
A convenient derive macro for actix_web::ResponseError trait.
Example
use ResponseError;
use Serialize;
use Error;
Details
- Status codes (from
actix_web::http::StatusCode) are specified in#[response(...)]attribute - Variants without
#[response(...)]attribute return Internal Server Error with empty body - Response body consists of serialised error and message (
error.to_string())
Error response body format