Skip to content

Commit

Permalink
fix: typo Missing vs missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Ruge committed Dec 15, 2023
1 parent 3a55c41 commit d3a252f
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 d3a252f

Please sign in to comment.