mirror of
https://github.com/teamhanko/hanko.git
synced 2025-11-01 22:28:27 +08:00
fix: send 401 when passcode is not found instead of 404
This commit is contained in:
@ -161,7 +161,7 @@ func (h *PasscodeHandler) Finish(c echo.Context) error {
|
|||||||
return fmt.Errorf("failed to get passcode: %w", err)
|
return fmt.Errorf("failed to get passcode: %w", err)
|
||||||
}
|
}
|
||||||
if passcode == nil {
|
if passcode == nil {
|
||||||
businessError = dto.NewHTTPError(http.StatusNotFound, "passcode not found")
|
businessError = dto.NewHTTPError(http.StatusUnauthorized).SetInternal(errors.New("passcode invalid"))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user