-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
remove json error code table #4427
remove json error code table #4427
Conversation
Remove the table of error codes mapped to their messages from the JSON section of the "Opcodes and Status Codes" page. This table was originally created when the message for an error code was not returned in the response, but now that this is the case with API version 8 and up we are removing the table of explicitly documented mappings.
So we are just casually removing clarifying information now? I'm sorry, but this seems a little backward. Sure, the message is provided in the response, but this is just purposefully hiding useful information, especially for libraries that want to map these errors to constants. Might as well just remove the HTTP status codes table since that information is searchable online |
Continuing on NovaFox's message, I use the error codes quite often to discriminate specific errors (e.g. if an API error is an UnknownMessage, UnknownChannel, or simply MissingPermissions) and do one thing or another, I can't be the only one doing this. With the removal of the table, we won't be able to have a reliable source for those codes, and they'll eventually fall outdated, meaning that in the future we won't be able to tell if an operation failed due to one specific thing or another. |
lol |
Gateway events don't need to be documented either, you can log what your bot receives and the payload and figure it out from there. |
We're needing the error codes for clarify errors in the libraries etc |
Making us have to purposefully cause errors against the API just to add contextual error handling to our applications sounds... counterintuitive. I really think this should've been passed by the community before merging this? |
Thanks to those of you who left constructive feedback. We're thinking about how to improve the error codes section of the documentation. |
Remove the table of error codes mapped to their messages from the JSON section of the "Opcodes and Status Codes" page. This table was originally created when the message for an error code was not returned in the response, but now that this is the case with API version 8 and up we are removing the table of explicitly documented mappings.