errors

package
v0.0.0-...-ed7afed Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package errors provides error handling utilities for OniWorks applications. In debug mode it renders a rich HTML error page (similar to Laravel's Ignition) with full stack trace, request details, and highlighted application frames. In production it returns a minimal JSON response.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(debugMode bool) func(*onihttp.Context, error)

Handler returns a router-compatible error handler. When debugMode is true and the error is not an HTTPError, it renders a detailed HTML page for browser requests or a verbose JSON payload for API requests. For HTTPError values (4xx / known 5xx) it always returns clean JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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