Expand description
RFC 7807 Problem Details helpers for consistent HTTP error responses.
Constants§
- AUTH_
REALM - Realm advertised in the
WWW-Authenticatechallenge of 401 responses.
Functions§
- build_
problem - Build a Problem Details value with type URI and detail.
- problem_
status_ title - Standard HTTP status phrase for Problem Details
title. - problem_
to_ bytes - Serialize problem details to JSON bytes (for sync response setup).
- write_
forbidden - 403 with optional extension fields (e.g.
required_roles). - write_
problem - Convenience: status + detail string.
- write_
problem_ response - Write RFC 7807 problem+json to the response.
- write_
unauthorized - Write the single 401 response of the framework.