Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix err handling #17

Merged
merged 1 commit into from
Jan 8, 2025
Merged

fix err handling #17

merged 1 commit into from
Jan 8, 2025

Conversation

Liuhaai
Copy link
Member

@Liuhaai Liuhaai commented Jan 8, 2025

fix #10

});

if (!response.ok) {
const errorData = await response.json();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug

Error fetching weather data: 45 |             });
46 |
47 |             console.log("response", response);
48 |
49 |             if (!response.ok) {
50 |                 const errorData = await response.json();
                                                      ^
SyntaxError: Failed to parse JSON
      at /quicksilver/src/tools/weatherapi.ts:50:50

@guo guo merged commit c244cdb into iotexproject:main Jan 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle the case if api does not respond
2 participants