workos_errors

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBadRequest

func IsBadRequest(err error) bool

func TryGetHTTPError added in v1.11.0

func TryGetHTTPError(r *http.Response) error

TryGetHTTPError returns an error when the http response contains invalid status code.

Types

type FieldError added in v1.14.0

type FieldError struct {
	Field string
	Code  string
}

type HTTPError added in v1.11.0

type HTTPError struct {
	Code        int
	Status      string
	RequestID   string
	Message     string
	ErrorCode   string
	Errors      []string
	FieldErrors []FieldError
}

HTTPError represents an http error.

func (HTTPError) Error added in v1.11.0

func (e HTTPError) Error() string

Jump to

Keyboard shortcuts

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