Skip to content

Commit c068323

Browse files
add error message when no recording file exists (Azure#21885)
1 parent f230d40 commit c068323

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def start_record_or_playback(test_id):
9090
PLAYBACK_START_URL,
9191
headers={"x-recording-file": test_id, "x-recording-sha": current_sha},
9292
)
93-
recording_id = result.headers["x-recording-id"]
93+
try:
94+
recording_id = result.headers["x-recording-id"]
95+
except KeyError:
96+
raise ValueError("No recording file found for {}".format(test_id))
9497
if result.text:
9598
try:
9699
variables = result.json()

0 commit comments

Comments
 (0)