fix: send 401 when passcode is not found instead of 404

This commit is contained in:
Felix Dubrownik
2022-09-19 09:38:07 +02:00
parent c9f95892a2
commit c1e9da128a

View File

@ -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
}