famedly / zitadel-rust-client

GNU Affero General Public License v3.0
0 stars 1 forks source link

Custom error types #30

Open emgrav opened 1 month ago

emgrav commented 1 month ago

Zitadel has a system of custom error codes returned in a gRPC message. This is just mapped onto the REST API in a way where we'll need to inspect the message to get the actual error. Regrettably, it appears Zitadel does not have the list of possible error codes documented, but it can be found reasonably easily in the Zitadel source code.

We should implement custom error types that parses the error responses and maps them to a real type directly usable by library consumers, rather than just passing the message along.

TODO: Compile list of most important error types we handle in f.x. wfs-z and create a task list.

emgrav commented 1 month ago

Zitadel have confirmed that they do not have any documentation for the error codes, so we'll have to look in the source.