Skip to content

Commit 4a54301

Browse files
committed
Catch bad status codes
1 parent 8567d8d commit 4a54301

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/murfey/server/api/instrument.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,10 @@ async def get_rsyncer_info(
464464
f"{machine_config.instrument_server_url}/sessions/{session_id}/rsyncer_info",
465465
headers={"Authorization": f"Bearer {token}"},
466466
) as resp:
467-
data = await resp.json()
467+
if resp.status == 200:
468+
data = await resp.json()
469+
else:
470+
data = []
468471
except KeyError:
469472
data = []
470473
except Exception:

0 commit comments

Comments
 (0)