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) {