Problem
A source with no key: value in the workspace settings is not caught anywhere. fetch builds the request URL from the missing value and sends the literal string undefined as the file key. Figma answers 404, and the CLI reports it as a key that is stale or out of reach — so the message names a cause that isn't the cause, and points at a key that was never there.
The same gap has a second consequence: a full Figma file URL pasted into a config key also 404s, while --source <url> accepts one and resolves it to a key.
Observed:
[CLI] GET file: https://api.figma.com/v1/files/undefined?geometry=paths
Error: File not found (404) while fetching organisms.file
Figma returned 404 for the file key configured for "organisms".
This usually means the key in your config is stale or out of reach:
• The file was moved, deleted, or recreated (keys change on duplicate/recreate)
• Your FIGMA_TOKEN account cannot open this file
Potential solution(s)
- Fail at config load, naming the source and the missing field, before any network call is made
- Accept a Figma file URL in a config key the same way
--source does
Acceptance criteria
Case data
- Workspace: fm — during a fetch
- Territory: cli
- Impacted file(s):
packages/cli/src/commands/FetchCommand.ts (normalizeSources), packages/cli/src/Config/ConfigLoader.ts, packages/cli/src/utilities/figmaFileKey.ts
- Size: s
Notes
Found while diagnosing two unrelated specs fetch failures in one run. The other failure in that run was an intermittent transport drop on a large file payload, tracked separately.
Implementation details are tracked internally.
Problem
A source with no
key:value in the workspace settings is not caught anywhere.fetchbuilds the request URL from the missing value and sends the literal stringundefinedas the file key. Figma answers 404, and the CLI reports it as a key that is stale or out of reach — so the message names a cause that isn't the cause, and points at a key that was never there.The same gap has a second consequence: a full Figma file URL pasted into a config key also 404s, while
--source <url>accepts one and resolves it to a key.Observed:
Potential solution(s)
--sourcedoesAcceptance criteria
--sourcedoesundefinedas the file keyCase data
packages/cli/src/commands/FetchCommand.ts(normalizeSources),packages/cli/src/Config/ConfigLoader.ts,packages/cli/src/utilities/figmaFileKey.tsNotes
Found while diagnosing two unrelated
specs fetchfailures in one run. The other failure in that run was an intermittent transport drop on a large file payload, tracked separately.