Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHTTPStatusCodeInResponse

func ParseHTTPStatusCodeInResponse(response *http.Response) (*http.Response, error)

ParseHTTPStatusCodeInResponse creates a HTTPError from http status code and message

Types

type HTTPError

type HTTPError struct {
	Status  int
	Message string
	Body    string
}

HTTPError is raised when status code is not 2xx

func (*HTTPError) Error

func (he *HTTPError) Error() string

This allows HTTPError to satisfy the error interface

Jump to

Keyboard shortcuts

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