error-handling
Implement comprehensive error handling and retry logic for Free Fire API calls including rate limiting, network errors, and exponential backoff
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement comprehensive error handling and retry logic for Free Fire API calls including rate limiting, network errors, and exponential backoff
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement secure authentication patterns for Free Fire API using header or query parameter authentication with proper API key handling
Process and format Free Fire API responses for different use cases including Discord bots, web dashboards, and calculating derived metrics
Generate Free Fire API integration code examples in multiple programming languages including Python, JavaScript, PHP, cURL, Java, Go, and Ruby
Validate input parameters before making Free Fire API calls including UID format, region values, language codes, and map codes
Implement caching strategies to reduce Free Fire API calls and avoid rate limits with TTL-based cache management
| name | error-handling |
| description | Implement comprehensive error handling and retry logic for Free Fire API calls including rate limiting, network errors, and exponential backoff |
This skill helps AI agents implement comprehensive error handling for Free Fire API integration.
AI agents should handle:
import time
from requests.exceptions import RequestException
import requests
def call_api_with_retry(url, headers, params, max_retries=3):
"""Call API with automatic retry logic"""
for attempt in range(max_retries):
try:
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
return response.json()
elif response.status_code == 404:
return {"error": "Player not found"}
elif response.status_code == 429:
# Rate limit - wait and retry
wait_time = 60 * (attempt + 1)
print(f"Rate limited. Waiting {wait_time}s...")
time.sleep(wait_time)
continue
elif response.status_code == 401:
raise Exception("Invalid API key")
else:
response.raise_for_status()
except RequestException as e:
if attempt == max_retries - 1:
raise
time.sleep(2 ** attempt) # Exponential backoff
return {"error": "Max retries exceeded"}