nuxt / nuxt/ui

[UButton] is not working with NuxtErrorBoundary

Open
#3,237 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
  • Operating System: Linux
  • Node Version: v22.12.0
  • Nuxt Version: 3.15.4
  • CLI Version: 3.21.1
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.15.2
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -
Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.12

Reproduction

https://codesandbox.io/p/devbox/bug-report-ubutton-8st7kw

Description

When I throw an error within the click event of UButton, the NuxtErrorBoundary component does not catch the error as expected. However, if I use a standard <button> tag instead of UButton, the error is caught correctly by the NuxtErrorBoundary.

Additional context
Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and compare the UButton click behavior with the standard case. Trace the UButton entry point and verify that an error thrown by its click event is caught by NuxtErrorBoundary, matching the native-button behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.