canonical / identity-platform-admin-ui

Admin UI for the Canonical identity broker and identity provider solution
Other
6 stars 4 forks source link

(ReBAC library) Implement proper error formatting #197

Closed babakks closed 7 months ago

babakks commented 7 months ago

This PR applies proper error formatting to match the OpenAPI spec, by implementing a custom ErrorHandlerFunc function. This also introduces some generic error types (e.g., UnauthorizedError or NotFoundError) which should be used by custom backends).

Some test cases are added to verify errors added are correctly formatted to a Response type.

Fixes CSS-7327