From d78b94372806507ccc3f7a86142a9e32b5f01103 Mon Sep 17 00:00:00 2001 From: Emma Mansell <73774046+7emansell@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:40:44 -0500 Subject: [PATCH] Tweaking error handling on helper --- pages/api/account/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/account/helpers.ts b/pages/api/account/helpers.ts index a58fbb087..db4dd30e9 100644 --- a/pages/api/account/helpers.ts +++ b/pages/api/account/helpers.ts @@ -60,7 +60,7 @@ export async function updateUsername( // Username taken but not an error, returns a message. return { status: 200, message: "Username taken" } } else { - return { status: 500, message: "Username update failed" } + throw new Error("Username update failed") } } } catch (error) {