Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/first-server/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,18 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
}

return {
content: {
mimeType: "application/json",
content: [{
type: "text",
text: JSON.stringify(forecasts, null, 2)
}
}]
};
} catch (error) {
if (axios.isAxiosError(error)) {
return {
content: {
mimeType: "text/plain",
content: [{
type: "text",
text: `Weather API error: ${error.response?.data.message ?? error.message}`
},
}],
isError: true,
}
}
Expand Down