Skip to content

Explain 403 as entitlement, return lookup tables whole - #14

Merged
arcaputo3 merged 1 commit into
gh-7-download-stdoutfrom
gh-8-tier-403-and-catalogs
Aug 5, 2026
Merged

Explain 403 as entitlement, return lookup tables whole#14
arcaputo3 merged 1 commit into
gh-7-download-stdoutfrom
gh-8-tier-403-and-catalogs

Conversation

@arcaputo3

Copy link
Copy Markdown
Contributor

Closes #8. Stacked on #13 (review the last commit only).

1. 403 no longer reads as an auth failure

$ quartr events summary 406161
quartr api error: 403 Forbidden: {"message":"Forbidden","statusCode":403}
hint: 403 means this endpoint is not included in your API tier, not that your key is
wrong (a rejected key returns 401). Every other endpoint keeps working with the same
key. Endpoints seen gated this way: `events summary`, `audio list`, `live transcripts list`.

The contrast with 401 is the load-bearing part — it is what lets a reader stop re-checking their key. 401 gets its own hint pointing at quartr auth show.

The raw API error is still printed verbatim above the hint, so nothing is hidden or swallowed.

2. The "undocumented typeId 25" was a truncated page

Worth stating plainly: the catalog was never missing anything. /document-types has 46 rows, the CLI asked for 10, and the ids people actually need sit past the cutoff:

$ quartr document-types list --format csv    # before
id,name,form
5,Slides,
6,Report,
7,Quarterly report,10-Q
10,Earnings release,8-K
11,Annual report,10-K
12,Annual report,
13,Annual report,20-F
14,Earnings release,6-K
15,Transcript,
17,Interim report,          <- stops here; 25 is row 16, 46 is row 36

25 (Shareholder letter) and 46 (DEFM14A) have been in the API all along. Nothing said the list was cut, so it read as an incomplete catalog.

So rather than ship a hand-maintained static table that would drift out of date, the two lookup tables are marked fullCatalog and paged to exhaustion by default:

$ quartr document-types list --format csv | wc -l
47      # 46 rows + header
$ quartr event-types list --format csv | wc -l
35

An explicit --limit or --cursor opts back out, so paging still works for anyone who wants it. This only applies to event-types and document-types — bounded reference tables where a partial answer is a wrong answer. Content endpoints are untouched.

The README gains a table of the common ids (10-K = 11, 10-Q = 7, 8-K = 10, slides = 5, shareholder letter = 25, DEFM14A = 46, Q1–Q4 calls = 26–29), explicitly labelled a convenience with the lookup commands as the source of truth.

Tests

403 and 401 hints; the catalog paging to exhaustion at limit=500; and an explicit --limit 5 making exactly one request.

🤖 Generated with Claude Code

Two paper cuts from #8.

A tier-gated endpoint answers with a bare {"message":"Forbidden"}, which is
indistinguishable from a credentials problem — and because every other
command keeps working on the same key, the natural conclusion is that auth
broke. Print a hint under 403 saying it is entitlement, not authentication,
and contrast it with the 401 a rejected key actually returns. 401 gets its
own hint pointing at `quartr auth show`.

The "undocumented typeId 25" turns out to be the default page size: the
document-type catalog has 46 rows and the CLI asked for 10, so 25
(shareholder letter) and 46 (DEFM14A) were simply past the cutoff — the API
has had them all along. Rather than hand-maintain a static table that would
drift, mark the two lookup tables as full catalogs and page them to
exhaustion by default. An explicit --limit or --cursor opts back out.

README gains a table of the common ids for quick reference, labelled as a
convenience with the lookup commands as the source of truth.

Closes #8

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@arcaputo3
arcaputo3 merged commit ad694a1 into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: raw 403 on tier-restricted endpoints reads as auth failure; document full typeId catalog

1 participant