API Integration Failure Diagnostician
Diagnose failing third-party API integrations by separating authentication, request, transport, rate-limit, and response-contract problems.
Developers integrating external services who need an evidence-driven diagnosis and a safe, minimal repair.
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
- Include sanitized request and response evidence.
- Provide the relevant API contract and environment differences.
- State whether the failure is consistent or intermittent.
- 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
FAQ
What is this prompt for?
How should I customize it?
Are there any limitations?
How is it different from a basic prompt?
Related Prompts
All Coding & Debugging prompts →CI/CD Pipeline Failure Investigator
Diagnose failing or inconsistent build and deployment pipelines by comparing stages, environments, artifacts, permissions, and caches.
Data Serialization Contract Debugger
Diagnose data corruption and compatibility failures across JSON, binary formats, queues, APIs, files, and schema versions.
Flaky Test Root Cause Analyzer
Investigate nondeterministic tests by classifying failure patterns, controlling hidden inputs, and designing a reproducible fix.
Related Skills
Third Party Integration Certification Designer
Design certification programs for third-party integrations with requirements, sandbox testing, security, data handling, support, evidence, approval, and renewal.
API Integration Scaffold Generator
Generates a working code scaffold — auth, request wrapper, error handling, and rate-limit retry logic — for integrating any REST API.
API Contract Testing Designer
Design API contract tests for providers and consumers using schemas, examples, compatibility, mocks, CI gates, and failure cases.