package errorsext
import "github.com/go-playground/pkg/v5/errors"
Index ¶
- func IsRetryableHTTP(err error) (retryType string, isRetryable bool)
- func IsRetryableNetwork(err error) (retryType string, isRetryable bool)
- func IsTemporary(err error) bool
- func IsTemporaryConnection(err error) (retryType string, isRetryable bool)
- func IsTimeout(err error) bool
Functions ¶
func IsRetryableHTTP ¶
IsRetryableHTTP returns if the provided error is considered retryable HTTP error. It also returns the type, in string form, for optional logging and metrics use.
func IsRetryableNetwork ¶
IsRetryableNetwork returns if the provided error is a retryable network related error. It also returns the type, in string form, for optional logging and metrics use.
func IsTemporary ¶
IsTemporary returns true if the provided error is considered retryable temporary error by testing if it complies with an interface implementing `Temporary() bool` and calling the function.
func IsTemporaryConnection ¶
IsTemporaryConnection returns if the provided error was a low level retryable connection error. It also returns the type, in string form, for optional logging and metrics use.
func IsTimeout ¶
IsTimeout returns true if the provided error is considered a retryable timeout error by testing if it complies with an interface implementing `Timeout() bool` and calling the function.
Source Files ¶
- Version
- v5.6.0
- Published
- Apr 28, 2022
- Platform
- darwin/amd64
- Imports
- 3 packages
- Last checked
- 33 minutes ago –
Tools for package owners.