Skip to content

Commit 9661a92

Browse files
docs(fdc): add troubleshooting entry for query params in URL (#1203)
1 parent 9d28682 commit 9661a92

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/fdc/6-troubleshooting.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,41 @@ If the API returns multiple fields, use `postProcessJq` to extract only the fiel
141141
Ensure your API endpoint is publicly accessible and not rate-limited.
142142
Attestation providers must be able to reach it from their infrastructure.
143143

144+
## Query Parameters in URL Cause Consensus Failure
145+
146+
### Symptoms
147+
148+
- Your `Web2Json` attestation request passes verifier preparation (status: `VALID`).
149+
- The DA Layer returns a `400 Bad Request` when retrieving the proof, or consensus fails silently.
150+
151+
### Root Cause: Query Parameters Embedded in the URL
152+
153+
The [`Web2Json`](/fdc/attestation-types/web2-json) attestation type provides a dedicated `queryParams` field for query parameters. If you include query parameters directly in the `url` field (e.g., `https://api.example.com/data?key=value`), attestation providers may not process the request correctly, leading to consensus failure.
154+
155+
### Solution: Use the `queryParams` Field
156+
157+
Move all query parameters from the URL into the `queryParams` field as a stringified JSON object.
158+
159+
**Before (query parameters in URL — incorrect):**
160+
161+
```json
162+
{
163+
"url": "https://api.example.com/reserves?timestamp=1700000000&format=json",
164+
"queryParams": "{}"
165+
}
166+
```
167+
168+
**After (query parameters in separate field — correct):**
169+
170+
```json
171+
{
172+
"url": "https://api.example.com/reserves",
173+
"queryParams": "{\"timestamp\":\"1700000000\",\"format\":\"json\"}"
174+
}
175+
```
176+
177+
This ensures all attestation providers construct the request identically, which is required for consensus.
178+
144179
## Attestation Request Rejected by Verifier
145180

146181
If the verifier returns an error when preparing your request, check the following:

0 commit comments

Comments
 (0)