Skip to content

Commit 76eb87e

Browse files
committed
fix(toolbox-core): Improve error handling in API response
1 parent 9411369 commit 76eb87e

File tree

1 file changed

+1
-1
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+1
-1
lines changed

packages/toolbox-core/src/toolbox_core/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async def load_toolset(
271271
# Request the definition of the toolset from the server
272272
url = f"{self.__base_url}/api/toolset/{name or ''}"
273273
async with self.__session.get(url, headers=resolved_headers) as response:
274-
if response.status != 200:
274+
if not response.ok:
275275
error_text = await response.text()
276276
raise RuntimeError(
277277
f"API request failed with status {response.status} ({response.reason}). Server response: {error_text}"

0 commit comments

Comments
 (0)