Skip to content

Glossary: Vue.js

try/catch

Also written: try, catch

JavaScript syntax that runs the code in `try` and, if it throws an error, runs the `catch` block to handle it. It lets a failed fetch show an error message instead of breaking the page.

Where the book teaches it

Related terms

Async functionHttpError