-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass HTTP status code & errcode from CS-API errors (#100)
* Pass HTTP status code & errcode from CS-API errors * (De)serialize error response details Allow client widget drivers to serialize Matrix API error responses into JSON to be received by the requesting widget. * Override name property of WidgetApiResponseError * Disable babel's no-invalid-this rule because Typescript has its own version of that rule * Increase test coverage Mock client-side responses to test deserializing them on the widget side * Increase test coverage some more * Accept more than just Matrix API error details As long as the error details payload is extensible, let drivers put more data in them than just the key for Matrix API error responses. * Don't make error data payload extensible as this makes it too easy for drivers to put data in the wrong section. Still define the payload type as an interface so that it can be extended in a future version of the API. Also don't use a subfield now that non-extensibility makes the format of the details fields unambiguous. * Set some missing fields in test * Test sendToDevice in ClientWidgetApi * Test navigation in ClientWidgetApi * Add missing license year
- Loading branch information
1 parent
5d1f971
commit e62698f
Showing
9 changed files
with
1,622 additions
and
232 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
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
Oops, something went wrong.