DejaVue

Error Handling in Vue


Listen Later

All of you have seen users do weird things with your application and running into strange scenarios - who can't relate to this?
For this and many other reasons, the right way of error handling is important in you application. Join Michael and Alex on a discussion of the different ways one can handle errors in their application.
That includes not always showing an error page, but also handling errors request-based or component-based!

On that note, error messages and how to write decent ones that are helpful for the users are discussed, as well as how components like NuxtErrorBoundary work under the hood

Enjoy the episode! 

Chapters

  • (00:00) - Welcome to DejaVue
  • (01:22) - The good old error page
  • (01:58) - Write good error messages!
  • (03:11) - The Vue global error handler
  • (05:07) - Server vs. Client Errors in Nuxt.js
  • (08:34) - The vue:error hook
  • (09:05) - Global error handling for $fetch and interceptors
  • (11:10) - Throw unhandled errors in Prod with Vue 3.5?
  • (13:07) - Component-level error handling
  • (16:33) - NuxtErrorBoundary
  • (18:01) - defineAsyncComponent
  • (18:53) - Request-based error handling
  • (21:45) - New default values in Nuxt 4
  • (23:30) - Error Tracking
  • (26:33) - Actually handling the errors
  • (28:54) - Wrapping up

  • Links and Resources


    • State of JS Survey
    • Sentry
    • Bugsnag
    • Rollbar
    • Michael's talk on error handling in Nuxt
    • Michael's article on error handling in Nuxt*
    • And another deep dive into Nuxt 3 error handling*
    • DejaVue #E034 - Data Fetching in Vue and Nuxt
    • Vue Issue regarding throwing errors in production (low level)
    • Vike
    • NuxtErrorBoundary component Source Code
    • ofetch
    • Zod
    • Valibot
    • Nuxt 4 error and data will be undefined by default
    • Create abstractions for your headings and buttons


    Your Hosts

    Alexander Lichter

    • BlueSky
    • Twitter
    • YouTube
    • Twitch
    • Website


    Michael Thiessen

    • Twitter
    • YouTube
    • Website


    Links marked with * are affiliate links. We get a small commission when you register for the service through our link. This helps us to keep the podcast running. We only include affiliate links for services mentioned in the episode or that we use ourselves.

    ...more
    View all episodesView all episodes
    Download on the App Store

    DejaVueBy Alexander Lichter & Michael Thiessen


    More shows like DejaVue

    View all
    The Changelog: Software Development, Open Source by Changelog Media

    The Changelog: Software Development, Open Source

    288 Listeners

    Startups For the Rest of Us by Rob Walling

    Startups For the Rest of Us

    709 Listeners

    The Vergecast by The Verge

    The Vergecast

    3,713 Listeners

    The a16z Show by Andreessen Horowitz

    The a16z Show

    1,095 Listeners

    Decoder with Nilay Patel by The Verge

    Decoder with Nilay Patel

    3,137 Listeners

    Daily Tech News Show by Tom Merritt

    Daily Tech News Show

    1,396 Listeners

    Software Engineering Daily by Software Engineering Daily

    Software Engineering Daily

    624 Listeners

    Talk Python To Me by Michael Kennedy

    Talk Python To Me

    580 Listeners

    Soft Skills Engineering by Jamison Dance and Dave Smith

    Soft Skills Engineering

    289 Listeners

    The SaaS Podcast: Build, Launch & Scale Your SaaS by Omer Khan

    The SaaS Podcast: Build, Launch & Scale Your SaaS

    186 Listeners

    Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

    Syntax - Tasty Web Development Treats

    989 Listeners

    The freeCodeCamp Podcast by freeCodeCamp.org

    The freeCodeCamp Podcast

    485 Listeners

    .NET Rocks! by Carl Franklin and Richard Campbell

    .NET Rocks!

    245 Listeners

    Moonshots with Peter Diamandis by PHD Ventures

    Moonshots with Peter Diamandis

    587 Listeners

    The Pragmatic Engineer by Gergely Orosz

    The Pragmatic Engineer

    70 Listeners