-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add help links and remove deprecated API (#417)
- Loading branch information
1 parent
d9972b2
commit da5ba76
Showing
8 changed files
with
276 additions
and
196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export namespace Help { | ||
export function forStatusCode(statusCode: number): string|undefined { | ||
switch (statusCode) { | ||
case 401: | ||
return 'The request was not authorized, most likely due to invalid credentials. ' | ||
+ 'For help, see https://croct.help/sdk/js/invalid-credentials'; | ||
|
||
case 403: | ||
return 'The origin of the request is not allowed in your application settings. ' | ||
+ 'For help, see https://croct.help/sdk/js/cors'; | ||
|
||
case 408: | ||
return 'The request timed out. ' | ||
+ 'For help, see https://croct.help/sdk/js/timeout'; | ||
|
||
case 423: | ||
return 'The application has exceeded the monthly active users (MAU) quota. ' | ||
+ 'For help, see https://croct.help/sdk/js/mau-exceeded'; | ||
|
||
default: | ||
return undefined; | ||
} | ||
} | ||
} |
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.