From 8985a912a3c0f02cde71529942ba8cd6a947f692 Mon Sep 17 00:00:00 2001 From: fflorent Date: Thu, 12 Sep 2024 16:00:05 +0200 Subject: [PATCH] =?UTF-8?q?Rename=20ex=20=E2=86=92=20err=20in=20catch=20bl?= =?UTF-8?q?ock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/server/lib/scim/v2/ScimUserController.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/server/lib/scim/v2/ScimUserController.ts b/app/server/lib/scim/v2/ScimUserController.ts index fe1ef02f6c6..4aec86d6b35 100644 --- a/app/server/lib/scim/v2/ScimUserController.ts +++ b/app/server/lib/scim/v2/ScimUserController.ts @@ -109,18 +109,18 @@ class ScimUserController { try { this._checkAccess(context); return await cb(); - } catch (ex) { - if (ex instanceof ApiError) { - if (ex.status === 409) { - throw new SCIMMY.Types.Error(ex.status, 'uniqueness', ex.message); + } catch (err) { + if (err instanceof ApiError) { + if (err.status === 409) { + 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) { - throw ex; + if (err instanceof SCIMMY.Types.Error) { + throw err; } // By default, return a 500 error - throw new SCIMMY.Types.Error(500, null!, ex.message); + throw new SCIMMY.Types.Error(500, null!, err.message); } }