Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Handling the Error

info

  • If fetch fails (e.g. no internet, server down), the code will jump to catch and print the error message.
  • You'll want see a helpful message like:
  Something went wrong: TypeError: Failed to fetch

[!TIP]

console.error('Something went wrong:', error);