mirror of
https://github.com/teamhanko/hanko.git
synced 2025-10-29 07:40:07 +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)
|
||||
}
|
||||
if passcode == nil {
|
||||
businessError = dto.NewHTTPError(http.StatusNotFound, "passcode not found")
|
||||
businessError = dto.NewHTTPError(http.StatusUnauthorized).SetInternal(errors.New("passcode invalid"))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user