Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorHandler = func(l ecslogger.ILogger) fiber.ErrorHandler { return func(c *fiber.Ctx, err error) error { code := fiber.StatusInternalServerError var resp interface{} var e *fiber.Error if errors.As(err, &e) { code = e.Code } else if apiErr, ok := err.(IError); ok { resp = apiErr.Response() code = apiErr.StatusCode() } if resp == nil { resp = response.Error(apierror.New(strconv.Itoa(code), err.Error(), code)) } l.Error(c.Path(), err) return c.Status(code).JSON(resp) } }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.