Expand description
RFC 9457 — Problem Details for HTTP APIs.
§Example
use rok_core::Problem;
let p = Problem::not_found("User 42 does not exist.");
assert_eq!(p.status, 404);
let custom = Problem::new("https://example.com/errors/quota-exceeded", "Quota Exceeded", 429)
.detail("You have exceeded your daily upload quota.")
.extend("limit", 100)
.extend("remaining", 0);
assert_eq!(custom.status, 429);Structs§
- Problem
- RFC 9457 problem details response.