@revenexx/app-sdk@0.5.0
Minor Changes
9ec65d2: Map PostgREST constraint violations to real HTTP statuses instead of forwarding them as 500s.
The remote/runtime adapters used to rethrow PostgREST's response verbatim, so every ordinary database condition surfaced as
500with the raw body — which also exposed table and constraint names to API callers. They now map:23505/23P01duplicate →40923503foreign key →400when the referenced parent is missing,409when a dependent row blocks a delete23502not-null,23514check,22xxxdata exceptions (incl.22P02bad uuid) →400PGRST103offset past the last row → no error at all: an empty page with the requestedlimit/offsetand the truetotal
Messages are stable and generic; responses carry a machine-readable
code. The raw PostgREST body is logged through the function'serror()and recorded on the trace, never returned.HttpErrormoved to a shared module so adapters can raise it — it is still exported from@revenexx/app-sdk/routerunchanged, and now from@revenexx/app-sdkas well, together withisHttpError()(use it instead ofinstanceof: the two entrypoints are separate bundles).