Skip to content

Commit

Permalink
Merge pull request #31 from dvjsharma/fix/issue-28
Browse files Browse the repository at this point in the history
fix(api): fixed error handeling in authentication middleware

Reviewed-by: [email protected]
Tested-by: [email protected]
  • Loading branch information
GMishx authored Jan 5, 2024
2 parents 6bba2bd + 76ce027 commit 55dbde0
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 55dbde0

Please sign in to comment.