-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore: adding additional logs to get original request in case of failure #198
Conversation
Codecov Report
@@ Coverage Diff @@
## main #198 +/- ##
============================================
- Coverage 21.99% 21.95% -0.04%
Complexity 75 75
============================================
Files 69 69
Lines 1819 1822 +3
Branches 55 55
============================================
Hits 400 400
- Misses 1410 1413 +3
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -84,7 +84,8 @@ public Single<EntityResultSet> getEntities(EntityRequest request) { | |||
return this.requestBuilder | |||
.buildRequest(request) | |||
.subscribeOn(this.boundedIoScheduler) | |||
.flatMap(serverRequest -> this.fetchAndMapEntities(context, request, serverRequest)); | |||
.flatMap(serverRequest -> this.fetchAndMapEntities(context, request, serverRequest)) | |||
.doOnError(error -> log.error("Error while handling entities request {}", request, error)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have GW handle this (if it throws, it should include the details of what failed as well as logging it locally). At this layer, the only relevant logging would be a debug log on a successful received response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GW logs the request. However I am looking for original request received by the graphql.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to log, but this isn't it - this is already an intermediate state, the result of the gql request processing. Ideally we should have the global gql error handler do such logging (we may need to do a bit of work to get to the initial request there).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Best to have a global error handler that logs original request on failure.
No description provided.