tanzegen opened a new pull request, #849: URL: https://github.com/apache/incubator-seata-go/pull/849
**What this PR does**: This pull request includes a change to improve error handling in the `WithGlobalTx` function in the `pkg/tm/transaction_executor.go` file. The update ensures that non-error types causing a panic are converted into an `error` type. Error handling improvement: * [`pkg/tm/transaction_executor.go`](diffhunk://#diff-4ebfecb088c499c7fb8dc49cc88b87f4827ab2b9c5d78aa1ab04ff446729336dR76-R84): Added logic to check if `deferErr` is not already an `error` type during a panic scenario and convert it to an `error` using `fmt.Errorf`. This ensures consistent error handling and prevents potential type mismatches. **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes # **Special notes for your reviewer**: **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org