mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
fix(api): declare the FHIR refusals as the OperationOutcomes they are
A /api/fhir/* handler answers its own refusals as FHIR: a bad search parameter is a 400 OperationOutcome, the hourly fhir bucket a 429 OperationOutcome (issue code throttled), both served as application/fhir+json, the same way the 404 on a read already was. The contract declared no 400 and the generic JSON 429 for the 429, and no 403 for the doctorReport module gate, which every data route runs. The searches now declare the 400, every data route the 403 module.disabled envelope and the FHIR 429 with the rate-limit headers apiHandler attaches to it. The module gate keeps answering the JSON envelope: it is the errorCode every client already branches on for a disabled module, and it runs before the FHIR face does. The route tests drop their skips and assert the 429's content type and Retry-After.
This commit is contained in:
1 parent
c272324c1e
commit
5ca3994523
4 files changed
+591
-533
No files matched your search
+541
-517
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user