fiber

package module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

type Option

type Option func(*config)

Option configures the ErrorHandler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL