File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ Let's build your first MCP server in Python! We'll create a weather server that
247247 text = json.dumps(forecasts, indent = 2 )
248248 )
249249 ]
250- except requests .HTTPError as e:
250+ except httpx .HTTPError as e:
251251 logger.error(f " Weather API error: { str (e)} " )
252252 raise RuntimeError (f " Weather API error: { str (e)} " )
253253 ```
@@ -448,7 +448,7 @@ Let's build your first MCP server in Python! We'll create a weather server that
448448 async with httpx.AsyncClient() as client:
449449 response = await client.get(... , params = {... , ** http_params})
450450 response.raise_for_status()
451- except requests .HTTPError as e:
451+ except httpx .HTTPError as e:
452452 raise McpError(
453453 ErrorCode.INTERNAL_ERROR ,
454454 f " API error: { str (e)} "
You can’t perform that action at this time.
0 commit comments