Skip to content

Commit

Permalink
Tweaking error handling on helper
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Nov 25, 2024
1 parent 4a5e036 commit d78b943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/api/account/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d78b943

Please sign in to comment.