File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/core/prompts/instructions Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,7 @@ weather-server/
8383 }
8484 ├── tsconfig.json
8585 └── src/
86- └── weather-server/
87- └── index.ts # Main server implementation
86+ └── index.ts # Main server implementation
8887\`\`\`
8988
90892. Replace \`src/index.ts\` with the following:
@@ -189,8 +188,12 @@ server.resource(
189188 ],
190189 };
191190 } catch (error) {
191+ if (axios.isAxiosError(error)) {
192+ throw new Error(\`Weather API error: \${
193+ error.response?.data.message ?? error.message
194+ }\`);
195+ }
192196 throw error;
193- }
194197 }
195198);
196199
@@ -224,8 +227,12 @@ server.resource(
224227 ],
225228 };
226229 } catch (error) {
230+ if (axios.isAxiosError(error)) {
231+ throw new Error(\`Weather API error: \${
232+ error.response?.data.message ?? error.message
233+ }\`);
234+ }
227235 throw error;
228- }
229236 }
230237);
231238
You can’t perform that action at this time.
0 commit comments