mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The save routes evaluate the same policy the senders do. A target on a private network the operator has not listed is a 422 with meta.errorCode = private_origin_not_approved and a message that names NOTIFICATION_PRIVATE_ORIGINS, instead of the generic "Invalid data"; a listed private address saves although the plain public floor would have refused it. The settings schemas take the target predicate as a parameter so the validator module never reads the environment; the exported constants keep the public floor for the OpenAPI contract. The test routes forward the sender's refusal as the same 422 and code instead of a bare 500, so the card can say why the test failed rather than sending the operator to the wide-event log. A delivery fault is still a 500. Both test routes and the dispatcher reach the same sender function, and a structural test holds them there. The OpenAPI descriptions name the code on all four routes; the test button's error map gains the code in every locale. Refs #947
2.4 MiB
2.4 MiB