errors

package
v0.181.32 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateErrorResponseFromError

func CreateErrorResponseFromError(err error) error

CreateErrorResponseFromError creates an ErrorResponse from a generic error.

Types

type ErrorCode

type ErrorCode string

ErrorCode represents a specific error code.

type ErrorResponse

type ErrorResponse struct {
	Code    ErrorCode `json:"code"`
	Details string    `json:"details,omitempty"`
}

ErrorResponse represents an error response structure.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

Error implements the error interface for ErrorResponse.

Jump to

Keyboard shortcuts

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