MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / APIError

Struct APIError

internal/apierror/apierror.go:41–45  ·  view source on GitHub ↗

APIError represents a custom error structure for the API. It includes an error code, message, and optional details to provide additional context for the error.

Source from the content-addressed store, hash-verified

39// APIError represents a custom error structure for the API.
40// It includes an error code, message, and optional details to provide additional context for the error.
41type APIError struct {
42 Code ErrorCode `json:"code"` // The specific error code that identifies the type of error.
43 Message string `json:"message"` // A human-readable message that describes the error.
44 Details interface{} `json:"details,omitempty"` // Optional field for additional details or context about the error.
45}
46
47// Error implements the error interface for APIError.
48// It returns a formatted string combining the error code and message.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected