2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +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:
Oliver 2024-01-16 00:31:10 +11:00 committed by GitHub
parent d152475de4
commit 1d41d229ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
### 0.14.2 - January 2024
---
- Updated error reporting
### 0.14.1 - January 2024
---

View File

@ -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",

View File

@ -1,7 +1,7 @@
name: inventree
description: InvenTree stock management
version: 0.14.1+79
version: 0.14.2+80
environment:
sdk: ">=2.19.5 <3.13.0"