Skip to content

Commit

Permalink
Improve error messages for downloading UF2s
Browse files Browse the repository at this point in the history
  • Loading branch information
tekktrik committed Dec 31, 2024
1 parent 27ef692 commit 85ce584
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion circfirm/backend/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def download_uf2(board_id: str, version: str, language: str = "en_US") -> None:

SUCCESS = 200
if response.status_code != SUCCESS:
raise ConnectionError(f"Could not download the specified UF2 file:\n{url}")
raise ConnectionError(
f"Could not download the specified UF2 file:\n{url}\nAre the board ID, version, and language correct?"
)

uf2_file.parent.mkdir(parents=True, exist_ok=True)
with open(uf2_file, mode="wb") as uf2file:
Expand Down

0 comments on commit 85ce584

Please sign in to comment.