Skip to content

Commit

Permalink
Return 401 code for ErrUnauthorized (stashapp#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
damontecres authored and halkeye committed Sep 1, 2024
1 parent ed42186 commit a7afce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func authenticateHandler() func(http.Handler) http.Handler {

userID, err := manager.GetInstance().SessionStore.Authenticate(w, r)
if err != nil {
if errors.Is(err, session.ErrUnauthorized) {
if !errors.Is(err, session.ErrUnauthorized) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
Expand Down

0 comments on commit a7afce8

Please sign in to comment.