errors

package
v0.0.0-...-837dd5c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    int
	Message string
	Err     error
}

APIError represents an API error with HTTP status code and message

func NewBadRequestError

func NewBadRequestError(message string, err error) *APIError

NewBadRequestError creates a new bad request error

func NewConflictError

func NewConflictError(message string, err error) *APIError

func NewForbiddenError

func NewForbiddenError(message string, err error) *APIError

func NewInternalServerError

func NewInternalServerError(message string, err error) *APIError

NewInternalServerError creates a new internal server error

func NewNotFoundError

func NewNotFoundError(message string, err error) *APIError

NewNotFoundError creates a new not found error

func NewNotImplementedError

func NewNotImplementedError(message string, err error) *APIError

func NewValidationError

func NewValidationError(message string, err error) *APIError

NewValidationError creates a new validation error

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface

func (*APIError) StatusCode

func (e *APIError) StatusCode() int

StatusCode returns the HTTP status code

func (*APIError) Unwrap

func (e *APIError) Unwrap() error

Unwrap returns the wrapped error

Jump to

Keyboard shortcuts

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