seamapi / react

Seam Components are a set of white-labeled UI elements that can be added to your application in seconds. Use them in any app as native web components or as React components and hooks.
https://react.seam.co
MIT License
6 stars 2 forks source link

fix: Error in some contexts when using Error.captureStackTrace() #587

Closed codetheweb closed 4 months ago

codetheweb commented 4 months ago

This only exists in v8 contexts and was throwing in Firefox.

It's not needed when extending the Error class.

codetheweb commented 4 months ago

Hiding the actual error:

Screenshot 2024-01-29 at 17 42 27
razor-x commented 4 months ago

This must have been a recommended best practice at some point (maybe erroneously?): https://github.com/seamapi/javascript/blob/22bd94dfdc32a30735e5ca02b1c61fd5aae3f72c/src/lib/api-error.ts#L15-L17

We can remove it from the other libs as well.