When a transaction fails, instead of returning a meaningful SendTransactionError, the library throws a generic serialization error that says:
Se: Expected the value to satisfy a union of type | type, but received: [object Object]
There is no further context or detailed logs returned, even if the transaction simulation fails.
This makes it extremely hard to debug failed transactions or understand why the instruction failed inside the program.
I believe the error is likely caused by the deserialization logic not gracefully handling RpcResponse or SimulatedTransactionResponse errors when they’re not in an expected format.