solid icon indicating copy to clipboard operation
solid copied to clipboard

feat: remove `castError`

Open lxsmnsyc opened this issue 1 year ago • 3 comments

THIS IS A BREAKING CHANGE

This PR changes the behavior of Solid's error handling, mainly on the concept of "casting errors". Solid has an internal mechanism wrapping thrown values if the value isn't an Error instance.

lxsmnsyc avatar Jan 11 '24 16:01 lxsmnsyc

⚠️ No Changeset found

Latest commit: 51e085aa3787a44ccd6ca6ca23bc0e9ce035a083

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 11 '24 16:01 changeset-bot[bot]

Why? It was this way before. We intentionally went to normalizing errors. I admit it was mostly for serialization so I could see the argument for reverting it now. But on the other hand I feel as much temptation to normalize farther to prevent serialization errors for things that random libraries pass us that can't be serialized.

ryansolid avatar Jan 11 '24 20:01 ryansolid

@ryansolid it's not exactly that way before. We used to check if the error is truthy, and not if the error existed.

lxsmnsyc avatar Jan 12 '24 02:01 lxsmnsyc