1. The problem
In one sentence
A workflow takes a value from one response (an id, a token) and uses it in the next call, and the response did not contain it.
A story
A client reads a record and uses its id for the next call: GET /lost-update?record={id}. The response is {"value":"initial","version":1}. There is no id. The client does not notice. It sends the next call with an empty or literal value, gets a 4xx, and reports a confusing error one step later. The real problem is in the first response.
Why it hurts
Real use of an API is a chain of calls: log in, create, read, update. One missing value early on makes every later call fail, with messages that point at the wrong place.
- For developers: the failing call is not the cause. The cause is the earlier response that lacked the value, or a spec that promised a field the server never sent.
- For managers: a login that returns no token takes down every feature that follows. The failures look widespread and unrelated.
- For DevOps: a pipeline that runs the chain end to end finds this at the step that broke it, and not three steps later.
Example
Step 1 reads the record and keeps $.id:
GET /conform-fail/lost-update -> 200 {"value":"initial","version":1}
There is no id field to keep. Step 2 builds its URL from that value (?record={{recordId}}) and has nothing to put in it.
How to detect it without clrsig
- Run the chain by hand with
curlandjq:curl -s URL | jq -r .idprintsnullwhen the field is missing. - In a script, stop at the first step whose value is empty (
set -eand a check on the variable).
How to fix it
There are two usual causes:
- The server is wrong. The response should carry the value (see AC-005). Fix the code.
- The spec or the script is wrong. The value lives in a header, or under another name. Fix the path you read it from.
To tell which: compare the real response with the spec. Never ignore an empty value and carry on.
Related problems
AC-005 A required field is missing from the body, AC-043 A stale update overwrites a newer one, AC-040 A business rule is broken though every response looks fine.
Words used on this page are explained once in the glossary.
2. How clrsig helps
Check
CS-RUN-008 An extraction finds nothing. State: caught. Severity today: failure (exit code 1). A scenario step’s extraction whose JSONPath or header is not in the response fails the step and the run, like a failed assertion, and the report says which extraction. A later step that needs the value is not sent (CS-RUN-001).
Command
Save this scenario as chain.yaml. It only sends GET requests, so nothing is written:
schemaVersion: "1"
title: next call needs a value from the previous response
steps:
- label: read the record
request: { method: GET, url: "{{baseUrl}}/lost-update" }
assertions:
- { type: status, operator: eq, expected: 200 }
extractions:
- { name: recordId, source: jsonpath, path: "$.id" }
failPolicy: continue
- label: use the id in the next call
request: { method: GET, url: "{{baseUrl}}/lost-update?record={{recordId}}" }
assertions:
- { type: status, operator: eq, expected: 200 }
failPolicy: continue
clrsig run chain.yaml \
--env clrsig/environments/conform-fail.yaml \
--spec specs/conform-fail.yaml
Exit code: 0 all steps pass, 1 a step failed, 2 the scenario or the setup is broken. Here it is 1.
What you see
Output from clrsig v0.21.0, recorded on 2026-11-30:
Scenario: next call needs a value from the previous response
FAIL read the record 200 14ms
error: extraction "recordId": jsonpath "$.id": unknown key id
✓ status eq 200
FAIL use the id in the next call
error: not sent: no value for {{recordId}} (set it in the environment, with --var, in the scenario's variables, or extract it in an earlier step)
→ {{recordId}} was to be extracted by step 1 (read the record), which got a 200 response, but the extraction did not find the value. Check: Compare the response of step 1 (read the record) with the extraction’s path or header name. [CS-HINT-001]
Spec: 1 of 2 responses were not compared with the spec (the step did not complete: 1)
FAILED 0 passed, 2 failed, 0 skipped (1/1 assertions passed) 15ms
How to read it: the first step’s assertion passes (✓ status eq 200) but the step fails, because the extraction found nothing. The second step is not sent, and the message says which value is missing. The cause is the first line.
Where to look
- Desktop app: open the scenario and run it; the step shows the extraction error.
- Reports: the failed extraction is part of the step in
--format jsonandjunit. - GitHub Action: use
command: runwith thescenario,envandspecinputs;specreplaces the scenario’sspecFile. Older releases of the Action ignoredspecwithrun; if you use one, addspecFile: specs/conform-fail.yamlto the scenario instead (the path is relative to the scenario file) (setup and upgrading).
How clrsig helps you fix it
It fails the step that should have produced the value, and says which extraction, so you do not chase the later 4xx. It does not know why the value is missing; compare the response with the spec.
Limits
- Older releases did not fail the run on a failed extraction (a clrsig finding that has since been fixed), so use a current release.
- The later steps follow the fail policy you set (
continuehere, so both steps appear).
More ways
Nothing yet.
3. Video brief for Google NotebookLM
VIDEO BRIEF — AC-027 · The next call needs a value the previous response did not give
Length: 5 to 7 minutes. Language: English. Audience: developers, with a line each for managers and DevOps.
One idea: real use of an API is a chain of calls; when an early response lacks a value, every later call fails with messages that point at the wrong place.
Open with this story: A client reads a record and uses its id for the next call. The response has a value and a version, but no id. The client does not notice. It sends the next call with an empty value, gets a client error, and reports a confusing message one step later. The real problem is in the first response.
Say these facts, in this order:
1. The scenario has two steps. Step one reads a record and keeps the id. The response has no id.
2. clrsig fails step one: the extraction found nothing, even though the status assertion passed.
3. Step two is not sent, because its value is missing; the message says which value.
4. Read the first line, not the last: the cause is in the first response.
5. Two usual causes: the server is wrong, the response should carry the value; or the spec or the script is wrong, because the value lives in a header or under another name.
6. For managers: a login that returns no token takes down every feature after it, and the failures look unrelated.
7. For DevOps: a pipeline that runs the chain end to end finds the problem at the step that broke it.
8. Use a recent clrsig version: older releases did not fail the run on a failed extraction.
Show on screen: the chain.yaml scenario, the first response without an id, the command (clrsig run chain.yaml --env clrsig/environments/conform-fail.yaml --spec specs/conform-fail.yaml), and the output block, copied exactly from the card.
Name the check: CS-RUN-008, An extraction finds nothing. Say the clrsig version: v0.21.0.
Explain these words once: extraction (keeping a value from a response to use in a later step); JSONPath (a short way to point at a field in a JSON body); scenario (a script of steps with your own checks, called assertions); exit code (0 clean, 1 a finding, 2 setup or spec broken).
Say what clrsig does not see here: it does not know why the value is missing; later steps follow the fail policy you set.
Safety line (if a write is shown): not needed, the scenario only sends GET requests.
Finish with three recap questions:
1. Which step shows the real cause? (The first one.)
2. Why is the second step not sent? (Its value is missing.)
3. Can a step pass its assertions and still fail? (Yes, when its extraction finds nothing.)
Tease the next video: AC-028 · A request without a required field is accepted.
Do not: say "contract testing" alone; say clrsig "catches everything"; invent flags, IDs or numbers; read tables aloud; use any fact that is not in the card.