ionic-appauth
ionic-appauth copied to clipboard
Use constants instead of raw text for errors
Hi @wi3land ,
Depending on the returned error from your library I need to go through a switch, and for now all errors are harcoded as text which is difficult to believe they won't change in the future.
Examples: https://github.com/wi3land/ionic-appauth/blob/3c4c5e900ffc3549090333bd53fbff643473afc2/src/authorization-request-handler.ts#L57 https://github.com/wi3land/ionic-appauth/blob/3c4c5e900ffc3549090333bd53fbff643473afc2/src/authorization-request-handler.ts#L68 ...
It would be great if you could provide constants like const ERROR_HANDLE_NOT_AVAILABLE = "Handle Not Available"
, like that you could change text if needed without breaking things in the developer code conditions :)
Thanks
I will look to introduce this in the next release, thanks