-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple error codes from status codes
This is in preparation for implementing CHA-PR3h, in which a given numerical error code no longer necessarily implies a specific status code (specifically, RoomInInvalidState may now have a 400 or 500 status code depending on the context in which it is thrown). The internal API introduced here is a bit convoluted and verbose, but I’ve done it this way for two reasons: 1. It reflects the way the spec is written; most of the time a numeric code has a status code written alongside it 2. For the numerical error codes that _do_ always imply a certain status code, I want to be able to get that status code still, so that the existing Messages code that throws an error with the messagesAttachmentFailed code, as well as the isChatError(…) test helper, continue to work as they currently do.
- Loading branch information
1 parent
c824a65
commit 89677f6
Showing
5 changed files
with
151 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters