> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/prism/architecture/connector-data-diagnostics.md).

# Connector Data Diagnostics

Prism can return connector payloads alongside its normalized response or structured connector error. Use them to compare what Prism sent and received with what its connector adapter parsed.

| Setting under `[common]`      | Fields returned when available                        | Contents                                                         |
| ----------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------- |
| `return_raw_connector_data`   | `raw_connector_request`, `raw_connector_response`     | Request URL, method, headers, and body; connector response body. |
| `return_typed_connector_data` | `typed_connector_request`, `typed_connector_response` | Connector-specific serialized request and parsed response.       |

These flags control **client-facing payloads**; they do not create fields a connector has not populated. The current code defaults both to `true`, and the sample environment configs enable both. To omit diagnostic payloads, set them explicitly:

```toml
[common]
return_raw_connector_data = false
return_typed_connector_data = false
```

Environment overrides are `CS__COMMON__RETURN_RAW_CONNECTOR_DATA` and `CS__COMMON__RETURN_TYPED_CONNECTOR_DATA`.

## Enable with care

On connector errors, Prism puts structured error details in the `grpc-status-details-bin` **HTTP/2 trailer**. Large raw or typed payloads can exceed a client's or proxy's header-list limit; the caller then sees a generic **h2 protocol error** instead of the connector error. Test worst-case error payloads through every proxy and client before enabling either flag. Raising the gRPC message-size limit alone does not raise the HTTP/2 trailer limit.

Raw requests can include unmasked headers and bodies. Treat all four fields as sensitive and expose them only to trusted clients. With both flags off, compact error details such as code, message, HTTP status, and connector IDs remain available.

See [config defaults](https://github.com/juspay/hyperswitch-docs/tree/main/integration-space/crates/common/ucs_env/src/configs.rs), [payload gating](https://github.com/juspay/hyperswitch-docs/tree/main/integration-space/crates/common/external-services/src/service.rs), and [gRPC error encoding](https://github.com/juspay/hyperswitch-docs/tree/main/integration-space/crates/common/ucs_env/src/error.rs).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperswitch.io/integrations/prism/architecture/connector-data-diagnostics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
