mirror of
https://github.com/khairul169/vaulterm.git
synced 2025-04-28 16:49:39 +07:00
15 lines
252 B
Go
15 lines
252 B
Go
package utils
|
|
|
|
import "github.com/gofiber/fiber/v2"
|
|
|
|
func ResponseError(c *fiber.Ctx, err error, status int) error {
|
|
if status == 0 {
|
|
status = fiber.StatusInternalServerError
|
|
}
|
|
|
|
return &fiber.Error{
|
|
Code: status,
|
|
Message: err.Error(),
|
|
}
|
|
}
|