-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Redirect users to `/login?redirect=…` if any endpoint responds with specific 401 Unauthorized message * Redirect users to requested resource after login succeeds * Use `/login?redirect=%2Fapi%2Fresource%2F…` in Signal error messages with screenshot URL * Put error messages in `commons` package
- Loading branch information
1 parent
0c67891
commit df09863
Showing
16 changed files
with
111 additions
and
58 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
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,22 @@ | ||
/** | ||
* An error message when fetching from Standard & Poor’s fails because we attempted to fetch a stock that is only | ||
* available for S&P Premium subscribers, which we, sadly, are not :( | ||
*/ | ||
export const SP_PREMIUM_STOCK_ERROR_MESSAGE = "This stock’s ESG Score is available for S&P Premium subscribers only."; | ||
|
||
/** | ||
* An error message when an unauthenticated user attempts to access a protected endpoint. | ||
*/ | ||
export const UNAUTHORIZED_ERROR_MESSAGE = "This endpoint is available to authenticated clients only. Please sign in."; | ||
|
||
/** | ||
* An error message when an authenticated user attempts to access a protected endpoint without the necessary access | ||
* rights. | ||
*/ | ||
export const FORBIDDEN_ERROR_MESSAGE = | ||
"The authenticated user account does not have the rights necessary to access this endpoint."; | ||
|
||
/** | ||
* An error message when a user attempts to register a new account with an email address that is already registered. | ||
*/ | ||
export const ALREADY_REGISTERED_ERROR_MESSAGE = "This email address is already registered. Please sign in."; |
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.