apache / arrow-adbc

Database connectivity API standard and libraries for Apache Arrow
https://arrow.apache.org/adbc/
Apache License 2.0
382 stars 95 forks source link

Add helpers to deal with error details #2179

Closed rshura closed 1 month ago

rshura commented 1 month ago

What feature or improvement would you like to see?

  1. The error details come encoded into Any. It would be nice if there was a Details() method that would decode from Any into a typed protobuf.
  2. It would be awesome if it was possible to convert adbc.Error into grpc.Status.
lidavidm commented 1 month ago

I don't think we're going to take a gRPC dependency in the core (nor are the errors here defined in terms of gRPC in the first place)

I assume this is for Go.

rshura commented 1 month ago

Let's narrow this down to encoding flightsql errors as ProtobufErrorDetail as opposed to anyErrorDetail.

rshura commented 1 month ago

Another thing: the list of error details included one actual error detail, and also three TextErrorDetail items with the key trailer and respective values Grpc-Status, Grpc-Message and Grpc-Status-Details-Bin. Perhaps flightsql error-packing can skip these, seeing how those values can't possibly be useful to the error-processing code.

rshura commented 1 month ago

Closing as this makes little sense outside of go. Within go I have a workable way to deal with the errors.