problems

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorHandler added in v0.2.5

func NewErrorHandler() ogenerrors.ErrorHandler

NewErrorHandler returns an ogen ErrorHandler that logs errors and returns RFC 7807 Problem Details responses.

func NewErrorHandlerModule added in v0.2.5

func NewErrorHandlerModule() fx.Option

NewErrorHandlerModule provides the error handler for ogen servers.

Types

type FieldError

type FieldError struct {
	Field   string `json:"field,omitempty"`
	Message string `json:"message"`
}

type Problem

type Problem struct {
	Type     string       `json:"type,omitempty"`
	Title    string       `json:"title"`
	Status   int          `json:"status"`
	Detail   string       `json:"detail,omitempty"`
	Instance string       `json:"instance,omitempty"`
	TraceID  string       `json:"traceId,omitempty"`
	Errors   []FieldError `json:"errors,omitempty"`
}

Problem represents RFC7807 Problem Details for HTTP APIs.

Jump to

Keyboard shortcuts

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