Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBadWaitState = errors.New("encountered bad state while waiting for resource")
var RetryableErrors = []int{ http.StatusTooManyRequests, http.StatusServiceUnavailable, http.StatusGatewayTimeout, }
RetryableErrors are the errors which will cause the operation to be retried
Functions ¶
func NewWithStatusCode ¶
NewWithStatusCode wraps err in an Error that provides better error messages than the openapi.GenericOpenAPIError, and can be retried if the HTTP response StatusCode is in RetryableErrors. If err is nil, NewWithStatusCode() returns nil.
Types ¶
type BadWaitState ¶ added in v0.22.4
type BadWaitState struct {
State string
}
func NewBadWaitStateError ¶ added in v0.22.4
func NewBadWaitStateError(state string) BadWaitState
func (BadWaitState) Error ¶ added in v0.22.4
func (e BadWaitState) Error() string
func (BadWaitState) Unwrap ¶ added in v0.22.4
func (e BadWaitState) Unwrap() error
type Error ¶
type Error struct { // ErrorModel is the ErrorModel of the underlying error *openapi.ErrorModel // Cause is the underlying cause of the error Cause error // StatusCode is the HTTP status code from the REST API call. StatusCode int }
Error is an error returned by the Rockset REST API.
func New ¶
New wraps err in an Error that provides better error messages than the openapi.GenericOpenAPIError
func (Error) IsNotFoundError ¶
IsNotFoundError returns true when the error is from an underlying 404 response from the Rockset REST API.
func (Error) RateLimited ¶
RateLimited checks if the error came from a http.StatusTooManyRequests, which is used for rate limiting.