added force show error parameter to standard toast
This commit is contained in:
parent
45effbbcde
commit
30c6389382
@ -50,7 +50,7 @@ export class StandardToasts {
|
|||||||
static FAIL_MOVE = "FAIL_MOVE"
|
static FAIL_MOVE = "FAIL_MOVE"
|
||||||
static FAIL_MERGE = "FAIL_MERGE"
|
static FAIL_MERGE = "FAIL_MERGE"
|
||||||
|
|
||||||
static makeStandardToast(context, toast, err) {
|
static makeStandardToast(context, toast, err = undefined, always_show_errors = false) {
|
||||||
let title = ''
|
let title = ''
|
||||||
let msg = ''
|
let msg = ''
|
||||||
let variant = ''
|
let variant = ''
|
||||||
@ -124,7 +124,7 @@ export class StandardToasts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let DEBUG = localStorage.getItem("DEBUG") === "True" || false
|
let DEBUG = localStorage.getItem("DEBUG") === "True" || always_show_errors
|
||||||
|
|
||||||
if (err !== undefined && 'response' in err && 'headers' in err.response) {
|
if (err !== undefined && 'response' in err && 'headers' in err.response) {
|
||||||
if (DEBUG && err.response.headers['content-type'] === 'application/json' && err.response.status < 500) {
|
if (DEBUG && err.response.headers['content-type'] === 'application/json' && err.response.status < 500) {
|
||||||
|
Loading…
Reference in New Issue
Block a user