Skip to content

Add requestIds to server HTTP error response.#2365

Merged
kenhuuu merged 1 commit intoapache:3.6-devfrom
Bit-Quill:ken/http-error-fix-3.6
Dec 15, 2023
Merged

Add requestIds to server HTTP error response.#2365
kenhuuu merged 1 commit intoapache:3.6-devfrom
Bit-Quill:ken/http-error-fix-3.6

Conversation

@kenhuuu
Copy link
Contributor

@kenhuuu kenhuuu commented Nov 24, 2023

HTTP errors are returned as JSON without requestId. The requestId is required in order to form a ResponseMessage that can be properly deserialized by the Java driver.

Not release blocking.

if (msg instanceof FullHttpMessage){
final FullHttpMessage request = (FullHttpMessage) msg;
final boolean keepAlive = HttpUtil.isKeepAlive(request);
final RequestMessage requestMessage = HttpHandlerUtil.getRequestMessageFromHttpRequest((FullHttpRequest) request);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to put inside try/catch

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (1e0cfae) 71.23% compared to head (2c1267f) 75.15%.

Files Patch % Lines
...lin/driver/handler/HttpGremlinResponseDecoder.java 0.00% 8 Missing ⚠️
.../server/handler/HttpBasicAuthorizationHandler.java 0.00% 8 Missing ⚠️
...lin/server/handler/HttpGremlinEndpointHandler.java 22.22% 7 Missing ⚠️
...kerpop/gremlin/server/handler/HttpHandlerUtil.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             3.6-dev    #2365      +/-   ##
=============================================
+ Coverage      71.23%   75.15%   +3.92%     
- Complexity         0    12311   +12311     
=============================================
  Files             25     1057    +1032     
  Lines           3772    63466   +59694     
  Branches           0     6936    +6936     
=============================================
+ Hits            2687    47701   +45014     
- Misses           898    13192   +12294     
- Partials         187     2573    +2386     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Cole-Greer
Copy link
Contributor

VOTE +1

@kenhuuu kenhuuu force-pushed the ken/http-error-fix-3.6 branch from c9e0523 to 2c1267f Compare December 6, 2023 00:29
@xiazcy
Copy link
Contributor

xiazcy commented Dec 13, 2023

VOTE +1

HTTP errors are returned as JSON without requestId. The requestId is
required in order to form a ResponseMessage that can be properly
deserialized by the Java/Python drivers.
@kenhuuu kenhuuu force-pushed the ken/http-error-fix-3.6 branch from 2c1267f to b4e7988 Compare December 15, 2023 00:03
@kenhuuu kenhuuu merged commit d4fc477 into apache:3.6-dev Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants