SharkSkin/api-error-retryability-dataset
API Error Retryability Classification This dataset classifies common API error messages and HTTP status codes into two categories: 'retryable' or 'permanent'. Developers can use this to build robust error handling logic, distinguishing between transient issues that can be retried automatically and permanent failures that require user intervention or code changes. 30 rows · category: reliability · licence: CC0-1.0 (public domain) Usage import… See the full description on the dataset page: https://huggingface.co/datasets/SharkSkin/api-error-retryability-dataset.
API Error Retryability Classification
This dataset classifies common API error messages and HTTP status codes into two categories: 'retryable' or 'permanent'. Developers can use this to build robust error handling logic, distinguishing between transient issues that can be retried automatically and permanent failures that require user intervention or code changes.
30 rows · category: reliability · licence: CC0-1.0 (public domain)
Usage
import api_error_retryability_classifier as classifier_module
import os
# Create a dummy data.jsonl for demonstration purposes
# In a real scenario, this file would already exist in the module's directory
dummy_data = [
{"input": "HTTP 400 Bad Request", "label": "permanent", "note": "Client sent malformed request."},
{"input": "HTTP 500 Internal Server Error", "label": "retryable", "note": "Generic server error."},
{"input": "HTTP 401 Unauthorized", "label": "permanent", "note": "Authentication missing."}
]
with open("data.jsonl", "w") as f:
for entry in dummy_data:
f.write(json.dumps(entry) + "\n")
# Load the dataset
dataset = classifier_module.load()
print(f"Loaded {len(dataset)} entries.")
if dataset:
print("First entry:", dataset[0]['input'], "->", dataset[0]['label'])
print("Second entry:", dataset[1]['input'], "->", dataset[1]['label'])
# Clean up the dummy file
os.remove("data.jsonl")
Sample rows
{"input": "HTTP 400 Bad Request", "label": "permanent", "note": "Client sent a malformed request, invalid syntax or parameters. Retrying without changes will fail."}
{"input": "HTTP 401 Unauthorized", "label": "permanent", "note": "Authentication credentials are missing or invalid. Requires correction of credentials."}
{"input": "HTTP 403 Forbidden", "label": "permanent", "note": "The authenticated client does not have permission to access the resource. Permissions need to be granted."}Files
Source: https://github.com/simalidudu-boop/api-error-retryability-dataset
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.
