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

remove json error code table #4427

Merged
merged 1 commit into from
Feb 1, 2022
Merged

remove json error code table #4427

merged 1 commit into from
Feb 1, 2022

Conversation

zeylahellyer
Copy link
Contributor

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.

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.
@zeylahellyer zeylahellyer merged commit 8f91fa1 into discord:master Feb 1, 2022
@zeylahellyer zeylahellyer deleted the remove-json-error-code-table branch February 1, 2022 22:42
@NovaFox161
Copy link
Contributor

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

@kyranet
Copy link
Contributor

kyranet commented Feb 1, 2022

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.

@ArsenArsen
Copy link

lol

@onerandomusername
Copy link
Contributor

Might as well just remove the HTTP status codes table since that information is searchable online

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.

@InvalidLenni
Copy link
Contributor

We're needing the error codes for clarify errors in the libraries etc

@MeguminSama
Copy link
Contributor

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?

@typpo
Copy link
Contributor

typpo commented Feb 1, 2022

Thanks to those of you who left constructive feedback. We're thinking about how to improve the error codes section of the documentation.

typpo pushed a commit that referenced this pull request Feb 1, 2022
@Rapptz Rapptz mentioned this pull request Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants