use StatusCode;
use ;
/// Every error body the API returns.
///
/// `name` is the machine-readable code clients branch on — `product.not_found`,
/// `product.validation_error.title_empty`. `message` is for people and logs; for domain errors,
/// whose `Display` *is* the code, the two are equal.
/// Maps a domain error to its HTTP status and body. Validation failures are `422 Unprocessable
/// Entity`: the request was well-formed (poem already answers `400` for one that is not) but
/// breaks a domain rule.