status

package
v0.0.92 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

status.go This package provides utility functions and structures for handling and categorizing HTTP error responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNonRetryableStatusCode

func IsNonRetryableStatusCode(resp *http.Response) bool

IsNonRetryableStatusCode checks if the provided response indicates a non-retryable error.

func IsRateLimitError

func IsRateLimitError(resp *http.Response) bool

IsRateLimitError checks if the provided response indicates a rate limit error.

func IsRetryableStatusCode

func IsRetryableStatusCode(statusCode int) bool

IsRetryableStatusCode checks if the provided HTTP status code is considered retryable.

func IsTransientError

func IsTransientError(resp *http.Response) bool

IsTransientError checks if an error or HTTP response indicates a transient error.

func TranslateStatusCode

func TranslateStatusCode(resp *http.Response) string

TranslateStatusCode provides a human-readable message for HTTP status codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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