mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Stock barcode fix (#232)
* API: Provide more info in error messages * Fix support for legacy stock item custom barcodes * Refresh display after assigning barcode * Update release notes * Fix for scanning unkown barcode - Modern API returns slightly different data * Fix for scanning unkown barcode - Modern API returns slightly different data * Update release notes
This commit is contained in:
parent
27040024c0
commit
d2b74e7684
7 changed files with 54 additions and 18 deletions
|
|
@ -185,10 +185,10 @@ Future<void> showServerError(String url, String title, String description) async
|
|||
/*
|
||||
* Displays an error indicating that the server returned an unexpected status code
|
||||
*/
|
||||
Future<void> showStatusCodeError(String url, int status) async {
|
||||
Future<void> showStatusCodeError(String url, int status, {String details=""}) async {
|
||||
|
||||
String msg = L10().responseInvalid;
|
||||
String extra = "${L10().statusCode}: ${status}";
|
||||
String extra = url + "\n" + "${L10().statusCode}: ${status}";
|
||||
|
||||
switch (status) {
|
||||
case 400:
|
||||
|
|
@ -231,6 +231,11 @@ Future<void> showStatusCodeError(String url, int status) async {
|
|||
break;
|
||||
}
|
||||
|
||||
if (details.isNotEmpty) {
|
||||
extra += "\n";
|
||||
extra += details;
|
||||
}
|
||||
|
||||
showServerError(
|
||||
url,
|
||||
msg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue