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

Possible Error Message Constants #100

Open
abMatillion opened this issue May 5, 2021 · 0 comments
Open

Possible Error Message Constants #100

abMatillion opened this issue May 5, 2021 · 0 comments
Labels
question Further information is requested

Comments

@abMatillion
Copy link

Would it be possible to have consts for the error messages that the api provides?

The errors codes are provided as consts within error_types.go which helps users of the library who don't need to worry about changes to the api, unfortunaletly there are times when the error code is not sufficient as a measure of the specific issue e.g. when hitting the change subscription endpoint there is the possibility of a validation error whereby the message would say something like Subscription hasn't changed.

I'd rather not assert on the message string within my code and would prefer if the library supported message consts or additional types for cases such as this as otherwise I have to keep an eye out for message changes within api versions which could break my code.

Thoughts?

@abMatillion abMatillion added the question Further information is requested label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant