feat: enhance JWT error handling by returning unauthorized status for missing or malformed JWT
Build and Release / release (push) Successful in 1m54s

This commit is contained in:
2026-06-15 22:51:39 +07:00
parent 925935788a
commit 5f28663969
2 changed files with 71 additions and 99 deletions
+1 -1
View File
@@ -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",