Two closely related causes, and both point at the calling application, not the API.
The literal word "undefined" or "null" in the URL. If your frontend or backend builds a URL from a variable that has not loaded yet, the language writes the literal text undefined (JavaScript) or null into the string - so the API receives undefined as your fund code or ticker and fails. If you see those words in a failed-request log, the fix is upstream: make sure the variable is fully populated before you fire the request (await the data, guard against empty state, do not build the URL during the initial render).
A 422 (or a "missing field" error). This is the API being helpful: it is telling you exactly which required inputs are absent. A comparison or historical-chart endpoint needs a date window - call /compare?symbols=AAPL with no start and end and there is no range to compute over, so you get a 422 naming the missing fields. Read the error body; it usually lists precisely what to add.
The distinction worth internalising: a 404 means the thing you asked for was not found, a 422 means your request was incomplete or the wrong shape. Treat a 422 as a checklist, not a wall. Related: a URL that looks correct but 404s, and what a good API error should tell you. Worked examples: https://www.tigzig.com/post/tigzig-api-errors-practical-guide-jul2026.
← All Agents FAQ