mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-17 03:20:39 +00:00
Better error handling in CorpusAnalysisApp
This commit is contained in:
@ -30,7 +30,11 @@ cqi.api.APIClient = class APIClient {
|
||||
} else if (response.code === 500) {
|
||||
throw new Error(`[${response.code}] ${response.msg}`);
|
||||
} else if (response.code === 502) {
|
||||
throw new cqi.errors.lookup[response.payload.code]();
|
||||
if (response.payload.code in cqi.errors.lookup) {
|
||||
throw new cqi.errors.lookup[response.payload.code]();
|
||||
} else {
|
||||
throw new cqi.errors.CQiError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user