Documentation
¶
Overview ¶
Package fiber renders lakta AppErrors as RFC 9457 application/problem+json. Import it aliased (e.g. errfiber) to avoid clashing with gofiber/fiber.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func ErrorHandler(opts ...Option) fiber.ErrorHandler
ErrorHandler returns a fiber.ErrorHandler that renders every handler error as application/problem+json. It converts via errors.FromError, then additionally maps a raw *fiber.Error (framework 404/405/…) into the equivalent AppError so framework and app errors render identically. Content-Type is ALWAYS application/problem+json (no text/html fallback); the request body is never reflected into detail. An INTERNAL error renders detail "internal error" only.
Types ¶
Click to show internal directories.
Click to hide internal directories.