mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Return 401 code for ErrUnauthorized (#4842)
This commit is contained in:
parent
ca5febc65b
commit
ad844a225c
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ func authenticateHandler() func(http.Handler) http.Handler {
|
||||||
|
|
||||||
userID, err := manager.GetInstance().SessionStore.Authenticate(w, r)
|
userID, err := manager.GetInstance().SessionStore.Authenticate(w, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, session.ErrUnauthorized) {
|
if !errors.Is(err, session.ErrUnauthorized) {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue