Skip to content

Commit

Permalink
Resolve golangci-lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnjanssen committed Feb 21, 2022
1 parent 90e5f7a commit 4298f6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ func callbackController(a *App) gin.HandlerFunc {
"token": rawIDToken,
})
} else {
c.Writer.WriteString("permission denied")
_, err := c.Writer.WriteString("permission denied")
if err != nil {
log.Errorf("unable to write response to user")
c.AbortWithStatus(http.StatusUnauthorized)
return
}
c.Status(http.StatusUnauthorized)
}
}
Expand Down

0 comments on commit 4298f6c

Please sign in to comment.