httperror

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package httperror defines functionality for handling HTTP errors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPError

func NewHTTPError(statuscode int, body string) error

NewHTTPError creates a new HTTPError based on the statuscode and body from a failed http call.

Types

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

HTTPError represents an error that occurred when interacting with the Styra API.

func (*HTTPError) Error

func (httpError *HTTPError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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