Skip to content

Commit

Permalink
fix: abort on error
Browse files Browse the repository at this point in the history
  • Loading branch information
C1320805 Elias Feijo de Almeida Pereira Lima committed Nov 10, 2022
1 parent b7b84c7 commit 2063050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ func authenticate(c *gin.Context) *http.Request {
}

func respondWithError(c *gin.Context, e *goauth.AuthMiddlewareError) {
c.JSON(e.Code, gin.H{"error": e.Message})
c.AbortWithStatusJSON(e.Code, gin.H{"error": e.Message})
}

0 comments on commit 2063050

Please sign in to comment.