return errors instead of panicing
This commit is contained in:
parent
f301e8c35a
commit
480481afee
@ -29,7 +29,8 @@ func Auth(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
user, err := base.AuthUser(ctx, p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if user.Authed {
|
||||
|
Loading…
Reference in New Issue
Block a user