utils

package
v0.0.0-...-72cdef8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-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