Skip to content

Commit

Permalink
refactor(middleware): have pendingDelete use an account error
Browse files Browse the repository at this point in the history
  • Loading branch information
pcfreak30 committed Sep 18, 2024
1 parent 00dee63 commit 251b644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl
}

if pendingDelete {
http.Error(w, "Account pending deletion", http.StatusForbidden)
acctErr := core.NewAccountError(core.ErrKeyAccountPendingDeletion, nil)
http.Error(w, acctErr.Error(), acctErr.HttpStatus())
return
}

Expand Down

0 comments on commit 251b644

Please sign in to comment.