Skip to content

Commit 2c595ca

Browse files
d-j-hattonstephen-riggs
authored andcommitted
Catch bad status codes
1 parent 7cffb19 commit 2c595ca

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
@@ -485,7 +485,10 @@ async def get_rsyncer_info(
485485
f"{machine_config.instrument_server_url}/sessions/{session_id}/rsyncer_info",
486486
headers={"Authorization": f"Bearer {token}"},
487487
) as resp:
488-
data = await resp.json()
488+
if resp.status == 200:
489+
data = await resp.json()
490+
else:
491+
data = []
489492
except KeyError:
490493
data = []
491494
except Exception:

0 commit comments

Comments
 (0)