Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] User's Exception's metadata thrown by method FlightServerMiddleware.onCallStarted() getting override and set to empty value #448

Open
PANKAJ9768 opened this issue Dec 4, 2024 · 0 comments
Labels
Type: bug Something isn't working

Comments

@PANKAJ9768
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

In flight producer , User is throwing StatusRuntimeException having metadata with custom error message from the implementation class of FlightServerMiddleware.onCallStarted ,
eg:
Metadata trailers=new Metadata(); trailers.put(Metadata.key.of("custom_msg",Metadata.ASCII_STRING_MARSHALLER),"custom error msg"); throw StatusUtils.fromGrpcRuntimeException(new StatusRuntimeException(Status.UNAUTHENTICATED,trailers) );
But this is getting override in in catch block of ServerInterceptorAdapter.interceptCall ,

Because of this at flight client side user is not able to propagate meaning error message , Only correct status is received at client side .

Expectation :
Metadata from FlightRuntimeException should be used while closing the call .
ServerInterceptorAdapter.interceptCall
call.close(StatusUtils.toGrpcStatus(e.status()), e.status().metadata());

Component(s)

FlightRPC, Java

@PANKAJ9768 PANKAJ9768 added the Type: bug Something isn't working label Dec 4, 2024
@PANKAJ9768 PANKAJ9768 changed the title [Java] Users Exception metadata thrown by method FlightServerMiddleware.onCallStarted() getting override and set to empty value [Java] User's Exception's metadata thrown by method FlightServerMiddleware.onCallStarted() getting override and set to empty value Dec 4, 2024
@kou kou transferred this issue from apache/arrow Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant