Debug Network Request Failures
Systematically troubleshoot API calls, HTTP requests, and network issues with this comprehensive debugging prompt for developers.
Prompt Template
Variables to Customize
[REQUEST_URL] The full URL or API endpoint being called
Example: https://api.example.com/v1/users/123
[HTTP_METHOD] The HTTP method being used
Example: POST
[REQUEST_HEADERS] Headers sent with the request
Example: Content-Type: application/json, Authorization: Bearer abc123
[REQUEST_BODY] The request payload or parameters
Example: {"name": "John Doe", "email": "john@example.com"}
[EXPECTED_RESPONSE] What response you expected to receive
Example: 200 OK with user creation confirmation
[ERROR_MESSAGE] The specific error message or code received
Example: Connection timeout after 30 seconds
[STATUS_CODE] HTTP status code returned (if any)
Example: 504 Gateway Timeout
[RESPONSE_HEADERS] Headers received in the response
Example: Server: nginx/1.18.0, Content-Type: text/html
[RESPONSE_BODY] The actual response body received
Example: Gateway timeout error - upstream server failed to respond
[ENVIRONMENT] The environment where the failure occurs
Example: Production environment, AWS us-east-1
[LANGUAGE_FRAMEWORK] Programming language and framework being used
Example: Node.js with Express and Axios
[FAILURE_TIMELINE] When the issue started occurring
Example: Started failing 2 hours ago, was working fine yesterday
[RECENT_CHANGES] Any recent changes to code, infrastructure, or configuration
Example: Updated API client library from v2.1 to v3.0 this morning
[OTHER_ENVIRONMENTS] Whether it works in other environments
Example: Works fine in staging environment, only fails in production
Example Output
Pro Tips for Best Results
- Always test with curl or Postman first to isolate whether it's a code issue or API issue
- Include timestamps and request IDs in your debugging information to help trace requests
- Check your API provider's status page and documentation for known issues
- Save working request examples for comparison when troubleshooting failures
- Implement proper logging to capture request/response details for future debugging
Tags
Want 500+ Expert Prompts?
Get the Premium Prompt Pack — organized, tested, and ready to use.
Get it for $29Related Prompts You Might Like
Write Comprehensive Technical Specifications
You are a senior technical architect tasked with creating comprehensive technical specifications. Write a detailed techn...
Implement WebSocket Connections
I need you to implement a complete WebSocket connection system for [APPLICATION_TYPE]. Please provide both client-side a...
Design Production-Ready GraphQL Schema
You are a senior GraphQL architect tasked with designing a comprehensive GraphQL schema for [PROJECT_TYPE]. Create a pro...
Debug Async JavaScript Issues
You are an expert JavaScript debugger specializing in asynchronous code issues. I need help debugging async JavaScript p...
Write Professional API Documentation
You are a technical documentation specialist tasked with creating comprehensive API documentation for [API_NAME]. Create...
Optimize JavaScript Bundle Size
You are an expert frontend performance engineer specializing in bundle optimization. I need you to analyze my JavaScript...