Improving Error Handling for `effect-sql` with `mysql2` in Sentry
I'm seeing the following error in Sentry coming from
The underlying error comes from
This is how I'm handling errors at my system boundary.
Is this wrong?
effect-sql in one of my projects:The underlying error comes from
mysql2 which would normally contain more information like which sql query failed and how exactly it failed. I'd be interested to see a more useful error message because these errors are not very common and not easily reproducible. I can see that the effect mysql2 wrapper already provides the cause to the error here: https://github.com/Effect-TS/effect/blob/main/packages/sql-mysql2/src/MysqlClient.ts#L105This is how I'm handling errors at my system boundary.
Is this wrong?
