workos_errors

package
v0.0.0-...-cee86e0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 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

func TryGetHTTPError(r *http.Response) error

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

Types

type FieldError

type FieldError struct {
	Field string
	Code  string
}

type HTTPError

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

func (e HTTPError) Error() string

Jump to

Keyboard shortcuts

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