Skip to content

Commit

Permalink
fix(api): fixed error handeling in authentication middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dvjsharma committed Jan 5, 2024
1 parent 6bba2bd commit 76ce027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func AuthenticationMiddleware() gin.HandlerFunc {
er := models.LicenseError{
Status: http.StatusUnauthorized,
Message: "User name not found",
Error: err.Error(),
Error: result.Error.Error(),
Path: c.Request.URL.Path,
Timestamp: time.Now().Format(time.RFC3339),
}
Expand All @@ -236,7 +236,7 @@ func AuthenticationMiddleware() gin.HandlerFunc {
er := models.LicenseError{
Status: http.StatusUnauthorized,
Message: "Incorrect password",
Error: err.Error(),
Error: "Password does not match",
Path: c.Request.URL.Path,
Timestamp: time.Now().Format(time.RFC3339),
}
Expand Down

0 comments on commit 76ce027

Please sign in to comment.