structured controller error body in ApiError.details #3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today the controller error body is captured into
ApiError::BadRequest.messageviaDisplayof the progenitor error (stringified). For the JSON envelope,error.detailsshould carry the parsed controller error object verbatim. Progenitor 0.14'sError<()>does not let us own the response, so a fix likely requires either (a) bumping to a progenitor that exposes the body, or (b) wrapping each generated call with our own reqwest layer that reads the body before constructingApiError.\n\nReference:crates/unifi-api/src/error.rs:26-28.Implemented in
f160869: added Option details to Http/Unauthorized/BadRequest/Server variants; from_status_with populates from body (JSON or string-wrapped). CLI envelope surfaces error.details. Auto-population from progenitor 0.14 ErrorResponse(()) remains blocked on the typed-body upgrade, but the infrastructure is now in place.