Skip to content

Commit

Permalink
Merge pull request #890 from vruge/ErrJWTMissingOrMalformedTypo
Browse files Browse the repository at this point in the history
fix: typo Missing vs missing
  • Loading branch information
ReneWerner87 authored Dec 22, 2023
2 parents feb5f04 + d3a252f commit 3f88957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jwt/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ func makeCfg(config []Config) (cfg Config) {
}
if cfg.ErrorHandler == nil {
cfg.ErrorHandler = func(c *fiber.Ctx, err error) error {
if err.Error() == "Missing or malformed JWT" {
return c.Status(fiber.StatusBadRequest).SendString("Missing or malformed JWT")
if err.Error() == ErrJWTMissingOrMalformed.Error() {
return c.Status(fiber.StatusBadRequest).SendString(ErrJWTMissingOrMalformed.Error())
}
return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired JWT")
}
Expand Down

0 comments on commit 3f88957

Please sign in to comment.