Coding & Debugging Prompts

API Integration Failure Diagnostician

Diagnose failing third-party API integrations by separating authentication, request, transport, rate-limit, and response-contract problems.

FreeClaudeChatGPT
Best for

Developers integrating external services who need an evidence-driven diagnosis and a safe, minimal repair.

Suitable LLM groups
FrontierReasoning
Download Prompt.md
Prompt
You are a senior integration engineer who specializes in diagnosing failures between applications and external APIs.

Inputs:
1. Intended integration behavior: {{expected_behavior}}
2. Request code or configuration: {{request_details}}
3. Response, error, and relevant logs: {{error_evidence}}
4. API documentation or contract: {{api_contract}}
5. Runtime, network, and security constraints: {{environment}}

Do the following:
1. Reconstruct the request lifecycle from credential loading through response parsing, and mark where the observed behavior first diverges from the expected behavior.
2. Rank plausible causes by evidence across authentication, authorization, URL and method, headers, serialization, network, timeout, rate limiting, versioning, and response-schema categories.
3. Propose the smallest diagnostic checks that distinguish the leading causes, while redacting secrets and avoiding unsafe production experiments.
4. Provide a minimal corrective patch or configuration change for the most likely cause, plus validation steps, rollback guidance, and handling for non-success responses.
5. Identify missing observability and resilience controls, including correlation IDs, bounded retries, backoff, idempotency, and contract tests. Separate confirmed facts from hypotheses.

How to use

  1. Include sanitized request and response evidence.
  2. Provide the relevant API contract and environment differences.
  3. State whether the failure is consistent or intermittent.
  4. Run proposed checks in a non-production environment first.

Example input

Expected behavior: Create a shipment label after an order is paid. Request: Node.js fetch POST to /v3/labels with JSON body; Authorization header uses a bearer token from an environment variable. Evidence: production returns 401, local sandbox succeeds, token prefix appears as undefined in a redacted production log. Contract: bearer token required; production and sandbox use different hosts and keys. Environment: Node.js 20 in a container, secrets injected by the deployment platform, no outbound proxy.

Example output

The diagnosis ranks a missing production secret as the leading cause because the token prefix is undefined before the request leaves the application. It recommends checking the deployment secret binding and environment-variable name, failing startup when the credential is absent, and rotating the token if it may have been logged. The patch validates the secret at boot and preserves redaction. Follow-up tests verify the production host, 401 handling, correlation IDs, and that retries do not repeat unauthorized requests.

Customization tips

  • Remove tokens, cookies, and personal data before pasting logs.
  • Include timestamps and correlation IDs when available.
  • Specify API and SDK versions.
  • Describe retry and idempotency behavior for write requests.

Tags

#api-debugging#integration-testing#http-errors#contract-validation#resilient-systems

FAQ

What is this prompt for?
It diagnoses where and why an external API request fails and recommends a minimal, testable correction.
How should I customize it?
Add sanitized code, exact status codes, response bodies, API versions, environment differences, and expected behavior.
Are there any limitations?
It cannot inspect the provider, network, or credentials directly, and incomplete logs may leave multiple plausible causes.
How is it different from a basic prompt?
It reconstructs the request lifecycle, ranks causes by evidence, and designs discriminating checks before proposing a patch.
Free

CI/CD Pipeline Failure Investigator

Diagnose failing or inconsistent build and deployment pipelines by comparing stages, environments, artifacts, permissions, and caches.

ClaudeChatGPT
#cicd-debugging#pipeline-failure#devops-troubleshooting
Free

Data Serialization Contract Debugger

Diagnose data corruption and compatibility failures across JSON, binary formats, queues, APIs, files, and schema versions.

ClaudeChatGPT
#serialization-debugging#schema-evolution#data-contracts
Free

Flaky Test Root Cause Analyzer

Investigate nondeterministic tests by classifying failure patterns, controlling hidden inputs, and designing a reproducible fix.

ClaudeChatGPT
#flaky-tests#test-reliability#nondeterminism

Related Skills

API & Integration BuildingFree

Third Party Integration Certification Designer

Design certification programs for third-party integrations with requirements, sandbox testing, security, data handling, support, evidence, approval, and renewal.

ClaudeChatGPT
#integration certification#partner API#technical validation
API & Integration BuildingFree

API Integration Scaffold Generator

Generates a working code scaffold — auth, request wrapper, error handling, and rate-limit retry logic — for integrating any REST API.

ClaudeChatGPTCursor
#api-integration#rest-api#boilerplate
Testing & Quality ChecksFree

API Contract Testing Designer

Design API contract tests for providers and consumers using schemas, examples, compatibility, mocks, CI gates, and failure cases.

ClaudeChatGPTCursor
#API contract testing#consumer driven contracts#Pact
Related articles coming soon — visit the Learn hub.