error

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpError

func HttpError(c *echo.Context, err *herodot.DefaultError) error

func McpError

func McpError(ctx context.Context, err *herodot.DefaultError) (*mcp.CallToolResult, any, error)

Types

type HttpErrorResponse

type HttpErrorResponse struct {
	// The error ID
	//
	// Useful when trying to identify various errors in application logic.
	IDField string `json:"id,omitempty"`

	// A human-readable reason for the error
	//
	// example: User with ID 1234 does not exist.
	ReasonField string `json:"reason,omitempty"`

	// Further error details
	DetailsField map[string]any `json:"details,omitempty"`

	// Already populated by default error
	StatusField string `json:"status,omitempty"`

	// Already populated by default error
	CodeField int `json:"code,omitempty"`

	// Already populated by default error
	ErrorField string `json:"message"`
}

Jump to

Keyboard shortcuts

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