Bubble up error
This commit is contained in:
parent
d9c921e101
commit
1633284f9d
|
@ -1 +1 @@
|
||||||
Subproject commit c764a88325b7ecd55aeff2140eab08fe9b32dac7
|
Subproject commit 56648174593e9531fbc27c4b841f06866f11e759
|
|
@ -122,10 +122,10 @@ export const resetUpdate = async (ctx: Ctx<PasswordResetUpdateRequest>) => {
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
message: "password reset successfully.",
|
message: "password reset successfully.",
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
console.warn(err)
|
console.warn(err)
|
||||||
// hide any details of the error for security
|
// hide any details of the error for security
|
||||||
ctx.throw(400, "Cannot reset password.")
|
ctx.throw(400, err.message || "Cannot reset password.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue