[Java] User's Exception's metadata thrown by method FlightServerMiddleware.onCallStarted() getting override and set to empty value
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/ServerInterceptorAdapter.java at the catch block in interceptCall, then read FlightServerMiddleware.onCallStarted and StatusUtils. Verify that metadata from a FlightRuntimeException is retained when the call closes, and confirm the client receives the custom trailer value instead of an empty one.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Java
- Stars
- 95
- Forks
- 154
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/arrow-java#1261 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1236 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1230 ·
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/arrow-java#1205 ·
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/arrow-java#1196 · 1 comment ·
All issues in apache/arrow-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100