APIs Flashcards
400 Cause
Bad request - invalid request syntax, missing params, incorrect data format
400 Resolution
Check params, check body of data sent (Content-Type)
401 Cause
Unauthorized: Missing or invalid auth credentials
401 Resolution
Check API Token (renew token?), service account key, verify auth method (Bearer token, basic auth)
403 Cause
Forbidden: User or app doesn’t have permission to access requested resource
403 Resolution
Confirm API key has necessary permissions, check for RBAC issues, Verify your IP address is whitelisted
404 Cause
Not Found: Requested resource or endpoint doesn’t exist
404 Resolution
check URL endpoint and port, ensure correct environment, confirm path exists
405 Cause
Method Not Allowed: HTTP method is not allowed for the endpoint
405 Resolution
Check the method being sent to endpoint. Is URL allowed by CORS?
408 Cause
Request Timeout: Server took too long to process the request
408 Resolution
Optimize request payload, check server’s performance, increase timeout value
429 Cause
Too Many Requests: API rate limit has been exceeded
429 Resolution
Implement rate-limiting logic, get higher limit
500 Cause
Internal Server Error: server-side error