Revenous Project

Hello codecademy community!

Hope you guys are well.

I have finished all the projects in the React Module, and now I was trying to do some stuff by myself, following what we have learned in the Yelp and Spotify project, but I have encountered one big problem for example with the Yelp project.

When we search for a business and this is not found in the API of Yelp, the app directly crashes. I’m trying to do something similar with the Openweather API, and after reading many resources, I cannot find a clear answer on how to handle bad requests in React, and apply it to the project.

Sharing with you my code for the Yelp project for example. How would you handle bad request in the project?

I hope someone can help.

Thank you so much!