generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from amosproj/dev-#141
Implementation of Dev #141
- Loading branch information
Showing
4 changed files
with
36 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @param {*} error error message status code(400/502/401) recieved from SimaPro API | ||
*/ | ||
|
||
export function ErrorAlert(error) { | ||
if (error === 400) { | ||
alert( | ||
'There are no preset calculation settings for this product. Please contact your system administrator.' | ||
); | ||
} else if (error === 502) { | ||
alert( | ||
'You tried to request data for multiple projects at once. Handling this error is work in progress. For now, please restart both frontend and backend to resolve this error.' | ||
); | ||
} else if (error === 401) { | ||
alert('Please verify the SimaPro cerdentials provided at the backend.'); | ||
} | ||
} |
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