feat: enhance JWT error handling by returning unauthorized status for missing or malformed JWT
Build and Release / release (push) Successful in 1m54s
Build and Release / release (push) Successful in 1m54s
This commit is contained in:
@@ -134,7 +134,7 @@ func jwtSuccessRefresh() fiber.Handler {
|
||||
|
||||
func jwtError(c fiber.Ctx, err error) error {
|
||||
if err.Error() == "Missing or malformed JWT" {
|
||||
return c.Status(fiber.StatusBadRequest).
|
||||
return c.Status(fiber.StatusUnauthorized).
|
||||
JSON(response.CommonResponse{
|
||||
Status: false,
|
||||
Message: "Missing or malformed JWT",
|
||||
|
||||
Reference in New Issue
Block a user