Skip to main content

Module error

Module error 

Source
Expand description

Product error mapping for Palette UI responses.

The Palette frontend renders code/message/remediation directly, so the JSON body is ApplicationError itself (already Serialize); this module only owns the HTTP status mapping. It delegates to soma-http-api’s shared classification rather than duplicating soma-api’s table — product-surface packages must not depend on one another (see xtask check-architecture), so both surfaces depend on the same shared/* crate instead.

Functions§

launcher_not_found
404 body for a launcher id that doesn’t resolve to any palette-exposed tool. The lookup happens in this crate, before any call reaches SomaApplication, so there is no real ApplicationError to map — but the body is still built as an ApplicationError value (rather than a hand-rolled json! literal) so every /v1/palette/* error response, found-then-failed or never-found, shares one wire shape (code/message/retryable/remediation/details) for the frontend.
palette_error_response
palette_error_status