Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors while recording

An account error (401, 402, 403) refuses the recording. A transient error (429, any 5xx, a stream the provider cut off, or a request that failed to reach the provider, which the client sees as a 502) is dropped from the take if the same request is then retried successfully, and refuses the recording otherwise. A refused recording leaves the previous take in place and exits non-zero; its new recording stays as <name>.take.partial, without a footer, for debugging (the summary names it), unless the final scan finds a secret in it, in which case it is deleted. Refusal is decided when the test or run ends; the run is never stopped early. --allow-errors keeps every response as recorded. Other errors, such as 400, are always kept.

Response while recordingDefaultWith --allow-errors
401, 402, 403 (account)Refuses the recordingKept
429, any 5xx, a cut-off stream, a failed connection (502), then a successful retryDropped; the retry is keptKept
The same, never retried successfullyRefuses the recordingKept
Other errors, such as 400KeptKept

--allow-errors (RETAKE_ALLOW_ERRORS) applies to the whole run. With the pytest plugin, @pytest.mark.retake(expect_errors=[429]) keeps the listed statuses for one test; see the plugin’s README.

Dropped and refused exchanges are listed in the recording summary. A refused recording’s .partial file can be removed with retake clean; see Leftover .partial files.