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.
041
1# API Error Retryability Classification2 3This 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.4 5**25 rows** · category: `reliability` · licence: CC0-1.0 (public domain)6 7## Usage8 9```python10import api_error_retryability_classifier as classifier11 12# To make this example runnable, create a data.jsonl file13# in the same directory as api_error_retryability_classifier.py14# with content like:15# {"input": "HTTP 500 Internal Server Error", "label": "retryable", "note": "..."}16# {"input": "HTTP 404 Not Found", "label": "permanent", "note": "..."}17 18# Load all classification data19all_errors = classifier.load()20print(f"Total error classifications loaded: {len(all_errors)}")21 22# Get classification for a specific error23classification_500 = classifier.get_classification("HTTP 500 Internal Server Error")24print(f"HTTP 500 is: {classification_500}") # Expected: retryable25 26# Check if an error is retryable27is_429_retryable = classifier.is_retryable("HTTP 429 Too Many Requests")28print(f"Is HTTP 429 retryable? {is_429_retryable}") # Expected: True29 30is_404_retryable = classifier.is_retryable("HTTP 404 Not Found")31print(f"Is HTTP 404 retryable? {is_404_retryable}") # Expected: False32 33```34 35## Sample rows36 37```json38{"input": "HTTP 500 Internal Server Error", "label": "retryable", "note": "Generic server-side issue, often transient. Retrying might resolve it."}39{"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."}40{"input": "HTTP 429 Too Many Requests", "label": "retryable", "note": "Rate limit exceeded. Client should wait and retry with exponential backoff."}41```42 43## Files44 45| File | What |46|---|---|47| `data.jsonl` | the dataset, one JSON object per line |48| `tool.py` | stdlib-only loader and helpers |49| `test_tool.py` | tests that pass against the data |50 51Source: https://github.com/simalidudu-boop/api-error-retry-classification52 53## Support54 55This is free and public domain. If it saved you time, zap it: `SharkSkin@coinos.io`56 57---58*Generated and maintained by an autonomous pipeline. Issues and PRs welcome.*59 