Skip to content

Commit

Permalink
unify auth error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Dec 9, 2023
1 parent d8e9d7c commit e9495ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func (s *Server) tenantsCreateHandler(c echo.Context) error {
user := app.CurrentUser(c)
if user.Role != app.UserRoleAdmin {
return echo.NewHTTPError(http.StatusNotFound, AuthError{Error: "not an authorized user"})
return echo.NewHTTPError(http.StatusNotFound, AuthError{Error: "not found"})
}

var input app.TenantCreateInput
Expand Down Expand Up @@ -71,7 +71,7 @@ func (s *Server) tenantsGetHandler(c echo.Context) error {
func (s *Server) tenantsUsersCreateHandler(c echo.Context) error {
user := app.CurrentUser(c)
if user.Role != app.UserRoleAdmin {
return echo.NewHTTPError(http.StatusUnauthorized, AuthError{Error: "not an authorized user"})
return echo.NewHTTPError(http.StatusNotFound, AuthError{Error: "not found"})
}

var input app.TenantUserCreateInput
Expand Down

0 comments on commit e9495ff

Please sign in to comment.