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

No error handling for the POST /weather endpoint #3

Open
pixelomer opened this issue Feb 17, 2023 · 2 comments
Open

No error handling for the POST /weather endpoint #3

pixelomer opened this issue Feb 17, 2023 · 2 comments

Comments

@pixelomer
Copy link
Contributor

Sending an invalid request or a valid request with an invalid city name will crash the application.

weatherApp/app.js:30
            temperature = weatherData.main.temp;
                                           ^

TypeError: Cannot read properties of undefined (reading 'temp')
@OgeHub
Copy link
Owner

OgeHub commented Feb 20, 2023

Thank you so much @pixelomer for pointing this out, I will work on it.

@OgeHub
Copy link
Owner

OgeHub commented Feb 20, 2023

@pixelomer , I have added error handling to the controller.

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

No branches or pull requests

2 participants