Array filter values are serialised as indexed keys and rejected by the API (HTTP 500)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- node.js, typescript
Research direction
Start in src/adapter.ts at the qs.stringify call and inspect how filter values for ticket and payment status are serialized. Check the registry and schemaToJsonSchema metadata to confirm the array declaration, then verify that the resulting request uses the API-accepted comma-separated shape for single and multiple statuses without changing include handling.
Written by the indexing model from the issue text.
Description
What happens
src/adapter.ts serialises options with qs.stringify and no arrayFormat:
search: qs.stringify({ filter, sort, page, include: processedInclude })
qs defaults to the indices format, so an array filter value becomes:
filter[status][0]=attending
The API rejects that shape. Verified against the live API on /tickets:
| Request | Result |
|---|---|
filter[status][0]=attending (what the client sends) |
HTTP 500 |
filter[status]=attending |
200 |
filter[status]=waitlist,attending |
200, and genuinely ORs — 25 records where waitlist alone returns 0 |
So the API wants a comma-separated list, and the client cannot currently produce one.
Why it matters
status is declared type: 'array' in the registry for both ticket and payment:
filters.status = { type: 'array', values: [ /* attending, waitlist, declined, invited, ... */ ] }
So the schema tells a consumer that an array is the correct input, and passing that array produces a 500. Anything generating tool schemas from the registry — which is exactly what schemaToJsonSchema and the filter metadata are for — will steer callers into the failing shape. We hit this from a real client:
confetti_tickets_find_all { filter: { eventId: 141404, status: ['attending'] } }
-> Error: HTTP 500
The failure is also opaque: a bare HTTP 500 with no body (see #34's sibling problem — non-400 responses are discarded before the caller sees them), so there is nothing to indicate the array was the cause.
payment.status has the same declaration and the same issue.
Suggested fix
Either serialise arrays as a comma list:
search: qs.stringify({ filter, sort, page, include: processedInclude }, { arrayFormat: 'comma' })
or collapse array filter values before stringifying, if comma affects other option shapes you would rather leave alone. include is already comma-joined by hand a few lines above, so comma is evidently the format the API expects for multi-value parameters generally.
Worth confirming which statuses the API accepts together while you are in there — the OR behaviour above is inferred from record counts, not documented.
Workaround for consumers
Join array filter values with commas before calling. That is what we now do downstream.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 51m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from confetti/confetti-node
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
confetti/confetti-node#36 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
confetti/confetti-node#35 ·
-
Module-global yayson Store leaks records between requests (cross-tenant in multi-key processes) Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
confetti/confetti-node#34 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
confetti/confetti-node#38 ·
-
rate_limit_reached Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
confetti/confetti-node#17 ·
All issues in confetti/confetti-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·