hyperlane-plugin-problem-details 23.3.0

An RFC 9457 Problem Details (application/problem+json) error normalizer and builder plugin for the Hyperlane framework with zero-overhead 2xx/3xx fast path and automatic 4xx/5xx error structuring.
Documentation
/// RFC 9457 media type for Problem Details JSON responses.
pub const PROBLEM_JSON_MEDIA_TYPE: &str = "application/problem+json; charset=utf-8";

/// Media type prefix checked to avoid double-wrapping existing Problem Details responses.
pub const PROBLEM_JSON_PREFIX: &str = "application/problem+json";

/// Default RFC 9457 `type` URI (`"about:blank"`).
pub const ABOUT_BLANK_TYPE: &str = "about:blank";

/// Default fallback title for unrecognized error status codes.
pub(crate) const DEFAULT_ERROR_TITLE: &str = "HTTP Error";

/// Standard status code titles for RFC 9457 normalization.
pub(crate) const TITLE_BAD_REQUEST: &str = "Bad Request";

/// Standard title for HTTP 401.
pub(crate) const TITLE_UNAUTHORIZED: &str = "Unauthorized";

/// Standard title for HTTP 403.
pub(crate) const TITLE_FORBIDDEN: &str = "Forbidden";

/// Standard title for HTTP 404.
pub(crate) const TITLE_NOT_FOUND: &str = "Not Found";

/// Standard title for HTTP 405.
pub(crate) const TITLE_METHOD_NOT_ALLOWED: &str = "Method Not Allowed";

/// Standard title for HTTP 409.
pub(crate) const TITLE_CONFLICT: &str = "Conflict";

/// Standard title for HTTP 413.
pub(crate) const TITLE_PAYLOAD_TOO_LARGE: &str = "Payload Too Large";

/// Standard title for HTTP 422.
pub(crate) const TITLE_UNPROCESSABLE_ENTITY: &str = "Unprocessable Entity";

/// Standard title for HTTP 429.
pub(crate) const TITLE_TOO_MANY_REQUESTS: &str = "Too Many Requests";

/// Standard title for HTTP 500.
pub(crate) const TITLE_INTERNAL_SERVER_ERROR: &str = "Internal Server Error";

/// Standard title for HTTP 502.
pub(crate) const TITLE_BAD_GATEWAY: &str = "Bad Gateway";

/// Standard title for HTTP 503.
pub(crate) const TITLE_SERVICE_UNAVAILABLE: &str = "Service Unavailable";

/// Standard title for HTTP 504.
pub(crate) const TITLE_GATEWAY_TIMEOUT: &str = "Gateway Timeout";

/// Plain text media prefix eligible for automatic wrapping.
pub(crate) const TEXT_PLAIN_PREFIX: &str = "text/plain";