mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Error report updates (#470)
* Prevent error reporting for certain status codes - These error codes indicate that there is something wrong with the server setup - Outside scope * Bump version
This commit is contained in:
parent
d152475de4
commit
1d41d229ca
3 changed files with 13 additions and 2 deletions
|
|
@ -950,7 +950,7 @@ class InvenTreeAPI {
|
|||
response.data = json.decode(jsondata);
|
||||
|
||||
// Report a server-side error
|
||||
if (response.statusCode >= 500) {
|
||||
if (response.statusCode == 500) {
|
||||
sentryReportMessage(
|
||||
"Server error in uploadFile()",
|
||||
context: {
|
||||
|
|
@ -1247,6 +1247,7 @@ class InvenTreeAPI {
|
|||
// Some server errors are not ones for us to worry about!
|
||||
switch (_response.statusCode) {
|
||||
case 502: // Bad gateway
|
||||
case 503: // Service unavailable
|
||||
case 504: // Gateway timeout
|
||||
break;
|
||||
default: // Any other error code
|
||||
|
|
@ -1318,6 +1319,11 @@ class InvenTreeAPI {
|
|||
case 404:
|
||||
// Ignore for unauthorized pages
|
||||
break;
|
||||
case 502:
|
||||
case 503:
|
||||
case 504:
|
||||
// Ignore for server errors
|
||||
break;
|
||||
default:
|
||||
sentryReportMessage(
|
||||
"Error decoding JSON response from server",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue