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
247
247
text = json.dumps(forecasts, indent = 2 )
248
248
)
249
249
]
250
- except requests .HTTPError as e:
250
+ except httpx .HTTPError as e:
251
251
logger.error(f " Weather API error: { str (e)} " )
252
252
raise RuntimeError (f " Weather API error: { str (e)} " )
253
253
```
@@ -448,7 +448,7 @@ Let's build your first MCP server in Python! We'll create a weather server that
448
448
async with httpx.AsyncClient() as client:
449
449
response = await client.get(... , params = {... , ** http_params})
450
450
response.raise_for_status()
451
- except requests .HTTPError as e:
451
+ except httpx .HTTPError as e:
452
452
raise McpError(
453
453
ErrorCode.INTERNAL_ERROR ,
454
454
f " API error: { str (e)} "
You can’t perform that action at this time.
0 commit comments