CoolFace
Datasetpublic

SharkSkin/api-error-retry-classification

API Error Retryability Classification This dataset classifies common API error messages and HTTP status codes into 'retryable' or 'permanent' categories. It helps developers implement robust error handling strategies, distinguishing between transient issues that warrant retries and fundamental problems requiring immediate client-side correction. 25 rows · category: reliability · licence: CC0-1.0 (public domain) Usage import api_error_retryability_classifier as… See the full description on the dataset page: https://huggingface.co/datasets/SharkSkin/api-error-retry-classification.

sourceHugging Faceupdated 18d agoView on Hugging Face
0likes41downloads
Dataset Card

API Error Retryability Classification

This dataset classifies common API error messages and HTTP status codes into 'retryable' or 'permanent' categories. It helps developers implement robust error handling strategies, distinguishing between transient issues that warrant retries and fundamental problems requiring immediate client-side correction.

25 rows · category: reliability · licence: CC0-1.0 (public domain)

Usage

python
import api_error_retryability_classifier as classifier

# To make this example runnable, create a data.jsonl file
# in the same directory as api_error_retryability_classifier.py
# with content like:
# {"input": "HTTP 500 Internal Server Error", "label": "retryable", "note": "..."}
# {"input": "HTTP 404 Not Found", "label": "permanent", "note": "..."}

# Load all classification data
all_errors = classifier.load()
print(f"Total error classifications loaded: {len(all_errors)}")

# Get classification for a specific error
classification_500 = classifier.get_classification("HTTP 500 Internal Server Error")
print(f"HTTP 500 is: {classification_500}") # Expected: retryable

# Check if an error is retryable
is_429_retryable = classifier.is_retryable("HTTP 429 Too Many Requests")
print(f"Is HTTP 429 retryable? {is_429_retryable}") # Expected: True

is_404_retryable = classifier.is_retryable("HTTP 404 Not Found")
print(f"Is HTTP 404 retryable? {is_404_retryable}") # Expected: False

Sample rows

json
{"input": "HTTP 500 Internal Server Error", "label": "retryable", "note": "Generic server-side issue, often transient. Retrying might resolve it."}
{"input": "HTTP 503 Service Unavailable", "label": "retryable", "note": "Server is temporarily unable to handle the request due to overloading or maintenance. Retry after a delay."}
{"input": "HTTP 429 Too Many Requests", "label": "retryable", "note": "Rate limit exceeded. Client should wait and retry with exponential backoff."}

Files

FileWhat
data.jsonlthe dataset, one JSON object per line
tool.pystdlib-only loader and helpers
test_tool.pytests that pass against the data

Source: https://github.com/simalidudu-boop/api-error-retry-classification

Support

This is free and public domain. If it saved you time, zap it: SharkSkin@coinos.io


Generated and maintained by an autonomous pipeline. Issues and PRs welcome.