Find out how to fix common errors in your Angular 2 application caused by misspelled URLs.
- [Instructor] Misspelled resource locators are a common…error when working with asynchronous server requests.…To mimic this issue, let's intentionally add a typo…to the end of the URL in the getRemote method…in our web-storage.service file.…Back in the browser, we see a console message…telling us that the get request for the specified URL…returns a 404 Not Found error, as well as the exception…thrown from Angulars Global error handler class.…There is also an uncaught error object,…which includes information about our server request.…
It's a good practice to always catch server errors,…and there are many ways to do this at both the component…and service levels.…For this course, we'll keep things simple and update…the subscribe method in the ngOnInit method…in our component with a second argument.…This argument is a callback that's invoked only…when an error is returned from an observable.…This callback takes a single argument, the error response,…which we can then work with like any other response object.…
In this case, we'll access the data inside the error object…
- Analyzing Angular 2 error messages
- Identifying the causes of common error messages
- Preventing common errors with custom error handling
- Analyzing testing reports
- Reviewing common testing report errors and their likely causes
Skill Level Intermediate
Angular 2 Essential Trainingwith Justin Schwartzenberger2h 45m Intermediate
Angular 2: Widget-Based Architectureswith Derek Peruo52m 18s Intermediate
1. Getting Started
Application overview1m 49s
2. How Angular 2 Reports Errors
Error handling in Angular1m 21s
3. Common Angular 2 Errors
4. Testing Angular 2 Applications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.