Skip to content

Commit 7959153

Browse files
Update update.py
1 parent 747e742 commit 7959153

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/reachy_mini/daemon/app/routers/update.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ def available(pre_release: bool = False) -> dict[str, dict[str, bool]]:
2323
if busy_lock.locked():
2424
raise HTTPException(status_code=400, detail="Update is in progress")
2525

26-
return {
27-
"update": {
28-
"reachy_mini": is_update_available("reachy_mini", pre_release),
26+
try:
27+
return {
28+
"update": {
29+
"reachy_mini": is_update_available("reachy_mini", pre_release),
30+
}
2931
}
30-
}
32+
except ConnectionError:
33+
raise HTTPException(status_code=503, detail="Unable to check for updates")
3134

3235

3336
@router.post("/start")

0 commit comments

Comments
 (0)