mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Decode response data when file upload fails
This commit is contained in:
parent
3e2b4454dd
commit
3e19e7f1cb
1 changed files with 4 additions and 0 deletions
|
|
@ -496,6 +496,9 @@ class InvenTreeAPI {
|
|||
if (response.statusCode >= 500) {
|
||||
// Server error
|
||||
if (response.statusCode >= 500) {
|
||||
|
||||
var data = await response.stream.bytesToString();
|
||||
|
||||
sentryReportMessage(
|
||||
"Server error on file upload",
|
||||
context: {
|
||||
|
|
@ -503,6 +506,7 @@ class InvenTreeAPI {
|
|||
"statusCode": "${response.statusCode}",
|
||||
"response": response.toString(),
|
||||
"request": request.fields.toString(),
|
||||
"data": data,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue