mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Rename ex → err in catch block
This commit is contained in:
parent
ef86aa1cd3
commit
acb5539290
@ -109,18 +109,18 @@ class ScimUserController {
|
|||||||
try {
|
try {
|
||||||
this._checkAccess(context);
|
this._checkAccess(context);
|
||||||
return await cb();
|
return await cb();
|
||||||
} catch (ex) {
|
} catch (err) {
|
||||||
if (ex instanceof ApiError) {
|
if (err instanceof ApiError) {
|
||||||
if (ex.status === 409) {
|
if (err.status === 409) {
|
||||||
throw new SCIMMY.Types.Error(ex.status, 'uniqueness', ex.message);
|
throw new SCIMMY.Types.Error(err.status, 'uniqueness', err.message);
|
||||||
}
|
}
|
||||||
throw new SCIMMY.Types.Error(ex.status, null!, ex.message);
|
throw new SCIMMY.Types.Error(err.status, null!, err.message);
|
||||||
}
|
}
|
||||||
if (ex instanceof SCIMMY.Types.Error) {
|
if (err instanceof SCIMMY.Types.Error) {
|
||||||
throw ex;
|
throw err;
|
||||||
}
|
}
|
||||||
// By default, return a 500 error
|
// By default, return a 500 error
|
||||||
throw new SCIMMY.Types.Error(500, null!, ex.message);
|
throw new SCIMMY.Types.Error(500, null!, err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user