Skip to content

Commit e90ce94

Browse files
ispyisailclaude
andcommitted
Update gotchas with Hello Club's confirmed fixes and clarifications
- Add sort stabilisation fix: append ,id to sort (e.g. sort=-updatedAt,id) - Clarify /event/upcoming is a removed endpoint, not a bug - Clarify date-required log endpoints are intentional, not spec bugs - Note all behaviours carry over to V2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cca6e1a commit e90ce94

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

docs/gotchas.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Common pitfalls when working with the Hello Club API, discovered through live testing.
44

5-
## Broken Endpoint: `/event/upcoming`
5+
## Removed Endpoint: `/event/upcoming`
66

7-
`GET /event/upcoming` returns `400 BadRequestError: "Invalid request"` for **all parameter combinations**. This endpoint appears to have been removed or disabled.
7+
`GET /event/upcoming` returns `400 BadRequestError: "Invalid request"` for **all parameter combinations**. Hello Club have confirmed this is not a bug — the endpoint has been removed, though it remains in the outdated OpenAPI spec. The same behaviour applies in V2.
88

99
**Workaround:** Use `GET /event` with `fromDate` and `toDate`:
1010

@@ -23,7 +23,7 @@ events = client.get("/event", params={
2323
2424
## Date-Required Endpoints (Spec Says Optional)
2525

26-
The spec says `fromDate`/`toDate` are optional for these endpoints, but the API returns **422** without them:
26+
The spec says `fromDate`/`toDate` are optional for these endpoints, but the API returns **422** without them. Hello Club have confirmed this is intentional — the spec is outdated, not the API. The same behaviour applies in V2.
2727

2828
- `GET /checkInLog` — returns 422 without dates
2929
- `GET /emailLog` — returns 422 without dates
@@ -163,7 +163,9 @@ Always check for both `null` and empty values when parsing.
163163

164164
**Severity: High** — causes silent data loss when paginating through members.
165165

166-
Sorting `GET /member` by anything other than the default (`-lastOnline`) produces **duplicate records** across pages, causing other members to be silently skipped. The offset-based pagination appears to use an unstable sort, so the same member can appear at different offsets on subsequent pages.
166+
Sorting `GET /member` by anything other than the default (`-lastOnline`) produces **duplicate records** across pages, causing other members to be silently skipped. The offset-based pagination uses an unstable sort when records share the same sort value, so the same member can appear at different offsets on subsequent pages.
167+
168+
**Root cause (confirmed by Hello Club, Mar 2026):** The sort is unstable when multiple records share the same value for the sort field. To ensure stable sorting, append `,id` to your sort specifier (e.g. `sort=-updatedAt,id`). Hello Club may change the API to do this automatically in future.
167169

168170
### Test Results (Mar 2026, 2,143 total members)
169171

@@ -201,7 +203,18 @@ Any code that paginates through all members using `sort=-updatedAt` (e.g., for i
201203

202204
### Workaround
203205

204-
**Official recommendation (from Hello Club support, Mar 2026):** For incremental sync, filter by `updatedAt` instead of sorting by it. This avoids the unstable pagination entirely:
206+
**Fix (confirmed by Hello Club, Mar 2026):** Append `,id` to your sort to make pagination stable:
207+
208+
```python
209+
# Stable sort — no duplicates or missing records
210+
page = client.get("/member", params={
211+
"limit": 100,
212+
"offset": 0,
213+
"sort": "-updatedAt,id", # id tiebreaker ensures stable ordering
214+
})
215+
```
216+
217+
**For incremental sync**, Hello Club also recommends filtering by `updatedAt` instead of sorting by it:
205218

206219
```python
207220
# Fetch only members updated since your last sync

0 commit comments

Comments
 (0)