BewareMyPower commented on code in PR #984:
URL: https://github.com/apache/pulsar-client-go/pull/984#discussion_r1145983425
##########
pulsar/error.go:
##########
@@ -225,3 +226,14 @@ func getResultStr(r Result) string {
return fmt.Sprintf("Result(%d)", r)
}
}
+
+func getErrorFromServerError(serverError *proto.ServerError) error {
Review Comment:
Sorry I might give a wrong suggestion. I just reviewed the `Result` enum
again, the `ServerError` cannot be converted to the `Error`. You have adjusted
the order to make `InvalidStatus` (`Result`) equal to
`ServerError_InvalidTxnStatus` (`ServerError`). However, other error codes
might not be the same. So it's better to map `ServerError` to `Result` manually
here, like what you did before.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]