-
Hi everyone I'm getting this error when I run
this error is good but its a difficult problem to solve because in my code I return with a specific status, here is my code
I saw a solution here gofiber/fiber#126 (comment) but this solution is hard to implement in my code. Please help |
Beta Was this translation helpful? Give feedback.
Answered by
ldez
Nov 23, 2021
Replies: 1 comment 1 reply
-
Hi, You have 3 solutions:
_ = c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
"error": fiber.Map{
"password": err.Error(),
},
})
linters-settings:
errcheck:
exclude-functions:
- (*github.com/gofiber/fiber.Ctx).JSON
err = c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
"success": false,
"error": fiber.Map{
"password": err.Error(),
},
})
if err != nil {
c.Next(err)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
raliqala
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
You have 3 solutions: