apierror

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(resp *http.Response) error

HandleError reads an HTTP error response and returns a structured *APIError.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
	Path       string
}

APIError represents a structured error response from the Nullify API.

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) IsNotFound

func (e *APIError) IsNotFound() bool

IsNotFound returns true if the error is a 404 Not Found.

func (*APIError) IsUnauthorized

func (e *APIError) IsUnauthorized() bool

IsUnauthorized returns true if the error is a 401 Unauthorized.

Jump to

Keyboard shortcuts

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