Right now the default behavior is that the access.deny methods redirects the user to the default app where devoplers have to handle the error states. This behavior is totally fine.
But it would be cool to have an option to have an additional paramater besides the one provided: success=false and error=message.
I think something of something like an “errorCode”.
Right now the only discriminator for handling error types in the tool is the error string itself.
In my case I have multiple reasons for denying access to the tool:
- missing permissions (should be handled in one dedicated view)
- email confirmation (should be handled in another dedicated view)
- general error handling like “invalid state” (should be handled in default view)
As you can see, it would be much easier to pick a view if there was an additional discriminator beside the message itself.