You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[17.0.0-rc.0] Runtime dispatcher error paths drop ValidationError.fields[] and downgrade status to 500 (rest-server maps it correctly) #3918
Found while investigating form UX during the HotCRM 17.0.0-rc.0 upgrade (tag commit fc156fa4a). Minor but it forecloses per-field error display for any surface served by the runtime dispatcher.
Facts
ValidationError carries .code='VALIDATION_FAILED' and .fields[], but no .status/.statusCode/.issues (packages/objectql/src/validation/record-validator.ts:106-122).
@objectstack/rest maps it correctly → 400 with top-level fields[] (packages/rest/src/rest-server.ts:134-143).
The runtime dispatcher's two error exits do neither:
packages/runtime/src/http-dispatcher.ts:495-506 (errorFromThrown): status falls back to 500 (no .status on the error), details reads only .issues (absent) → fields[] lost.
packages/runtime/src/dispatcher-plugin.ts:378-410 (errorResponseBase): same status fallback; body carries only {message, code}, and :402 replaces the message with the generic INTERNAL_ERROR_MESSAGE on 5xx — so the caller gets a 500 "internal error" for a user-input validation failure.
Ask
Teach both dispatcher exits the VALIDATION_FAILED shape (status 400 + fields[] passthrough), matching rest-server.
Activity
fix(runtime): serve VALIDATION_FAILED as 400 with fields[] from both …
fix(runtime): route every domain catch through errorFromThrown (#3918 …
fix(client): normalize both server error envelopes so err.code / err.…
fix(rest): ingress parse failures speak the documented fields[] envelope
fix(runtime): carry code/fields across the sandbox boundary so form a…
fix(rest): ingress parse failures speak the documented fields[] envelope
fix(spec,runtime)!: AnalyticsQueryRequest is the bare AnalyticsQuery;…
fix(runtime): refuse malformed notifications query params with an ADR…
fix(automation): refuse unknown top-level keys on the resume body
fix(automation): the resume body's outer envelope becomes a closed se…
fix(spec): the error-code waiver reasons and the auth-feature registr…