Attempted to assign to readonly property.

Timkor
6
Timkor
commented 7 months ago

Version

v2.4.3

Reproduction link

https://github.com/nuxt/nuxt.js/blob/f791d786e0996e4cad2b1ddbe244a747e7e700aa/packages/vue-app/template/client.js#L81

Steps to reproduce

Throw a error while mounting Nuxt (client)

What is expected ?

To adjust the error message

What is actually happening?

A new error is thrown saying: Attempted to assign to readonly property.

Additional comments?

https://github.com/nuxt/nuxt.js/blob/f791d786e0996e4cad2b1ddbe244a747e7e700aa/packages/vue-app/template/client.js#L81

bug
0
manniL
5.8k
manniL
commented 7 months ago

@Timkor Feel free to submit a PR that covers the expected state

0
Timkor
6
Timkor
commented 6 months ago

This is still a problem.
image

The problem is that the property message of DOMException is read only. Hence it cannot be adjusted by Nuxt.

Here the specification of DOMException:
https://heycam.github.io/webidl/#idl-DOMException

A simple fix could be one of those:

  • Create a new Error including the original message
  • Use the original Error
0
Informations
Bug Report โ€ข Open
#c8681 - Created 7 months ago