mirror of
https://github.com/openziti/ziti.git
synced 2026-11-25 00:41:54 +00:00
a827bfbe14
- maps UniqueIndexDuplicateError and ReferenceExistsError in ToApiError, so forwarded duplicate-name creates and referenced deletes return 400 and 409 from a follower instead of 500 - replaces the hand-written error switches in the create, delete, update and patch route helpers with ToApiError - moves the peer channel API error encoding and decoding into one cause codec registry in the raft package, covering not-found, field, duplicate index, reference exists and schema validation errors - parses both shapes ValidationErrors marshals to, one error bare or several under Reason and Errors - sends an unregistered cause as its message on both sides instead of a raw JSON object - tests each mapping, a round trip for every cause class, and a duplicate-name service create through the API