Troubleshooting errors in the browser
In this section, you will intentionally introduce an easy-to-make mistake so that you can become familiar with real-life errors that can happen while developing your applications and gain a solid understanding of the tooling that makes you an effective developer.
Please refer to Chapter 4, Automated Testing, CI, and Releasing to Production, and the LocalCast Weather app to get a better context of the following code sample.
The latest version of the LocalCast Weather app can be found on GitHub at https://github.com/duluca/local-weather-app.
Let's pretend that we made an innocent mistake when copying and pasting the URL from the API documentation page on OpenWeatherMap.org
and forgot to add http://
in front of it. This is an easy mistake to make:
src/app/weather/weather.service.ts
...
return this.httpClient
.get<ICurrentWeatherData>(
`api.openweathermap.org/data/2.5/weather?q=${city},${country...