Decode a raw error response
pc_decode_errorDecode a Partner Center error response to extract error code, HTTP status, MS-CorrelationId, and get documented causes, remediation, and exact support-request wording. Use it as the first step when an API call fails.
Instructions
Take a raw Partner Center error response and decode it: extract the error code, HTTP status, and MS-CorrelationId, then return the documented causes, remediation, likely scenarios, and the exact wording to quote in a support request. This is the right first tool when something failed and you have the response in hand. Use pc_lookup_error instead when you have already isolated a clean code, and pc_diagnose when you only have a prose description with no response body. Read-only, offline, deterministic parsing — the input is never sent anywhere and no request is replayed. Always returns ok:true: an unrecognised code still yields the parsed fields, status-based candidates, and a note on what to try next.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | Yes | The error response pasted verbatim — a JSON body such as {"code":"900400","description":"..."}, or unstructured log text containing the failure. Include the response headers if you have them so the MS-CorrelationId can be recovered. Partial or malformed input is handled: whatever cannot be parsed is reported as null. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the call succeeded and `data` is populated; false when `error` explains why not. | |
| data | No | The result payload. Present only when `ok` is true. | |
| error | No | Human-readable reason the call failed. Present only when `ok` is false. |