mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +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:
@ -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",
|
||||
|
Reference in New Issue
Block a user