Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some kind of error handling #14

Open
elieven opened this issue Jan 14, 2025 · 1 comment
Open

Add some kind of error handling #14

elieven opened this issue Jan 14, 2025 · 1 comment

Comments

@elieven
Copy link

elieven commented Jan 14, 2025

Currently there is no nice / built in way of handling / checking of errors. You basically have to parse the message (hoping it has not changed in a new release) or manually recheck the various parts of the id. It would be nice to have some better way of knowing what went wrong. Perhaps something like an error.code or error instanceof TypeIdInvalidPrefixError or whatever.

Note that this is not an urgent need at the moment nor am I saying this is what needs to be there but I would like to start a discussion of what to do about this. Someone at some point might want to know what went wrong with the id or the processing of it to perhaps do something about it. If nothing else then returning better and / or custom error messages from your own API.

@LucilleH
Copy link
Contributor

LucilleH commented Feb 3, 2025

@elieven Good call 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants