Bubble up error

This commit is contained in:
Adria Navarro 2024-01-02 13:02:24 +01:00
parent d9c921e101
commit 1633284f9d
2 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit c764a88325b7ecd55aeff2140eab08fe9b32dac7
Subproject commit 56648174593e9531fbc27c4b841f06866f11e759

View File

@ -122,10 +122,10 @@ export const resetUpdate = async (ctx: Ctx<PasswordResetUpdateRequest>) => {
ctx.body = {
message: "password reset successfully.",
}
} catch (err) {
} catch (err: any) {
console.warn(err)
// hide any details of the error for security
ctx.throw(400, "Cannot reset password.")
ctx.throw(400, err.message || "Cannot reset password.")
}
}