Expand description
CleanLibraryError hierarchy per Client spec rev1 §2.3 + Rev 2 amendment §2.
Mirrors App Rev 4 §9.2 reason-code enum surfaced via X-CleanLibrary-Reason
response header.
Structs§
- Problem
Details - CLEANLIB-536: RFC 9457
application/problem+jsonproblem document (reader side). Mirrorscleanlib-app::problem::ProblemDetailsas a TOLERANT reader — every field is defaulted and unknown members are ignored (nodeny_unknown_fields), so a new App extension never breaks parsing. Standard RFC 9457 members (type/title/status/detail/instance) plus the CLEANLIB-536 extensions.
Enums§
- Clean
Library Error - Top-level error type for cleanlib-client operations. Mirrors Rev 1 §2.3 mapping table.
- Transport
Error
Functions§
- from_
http - Map HTTP
status+ headers + body into aCleanLibraryErrorvariant. ReadsX-CleanLibrary-Reasonheader per App Rev 4 §9.2 reason codes. - parse_
problem_ details - Parse an
application/problem+jsonbody (CLEANLIB-536) intoProblemDetails, returningNonewhen the body is absent or is not a problem document. A body is treated as a problem document when the responseContent-Typeisapplication/problem+jsonOR (defensively, in case a proxy strips the content-type) the parsedtypeURI is under the canonicalhttps://cleanlibrary.dev/problems/base. A bare JSON error body that merely happens to carry atypefield is NOT misclassified.