-
Notifications
You must be signed in to change notification settings - Fork 45
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
Enable HttpPostRequestCallback to fail requests #124
base: main
Are you sure you want to change the base?
Changes from 1 commit
9e02c27
29139e1
93ba816
084fd52
00fdaf6
c32d55b
cb1ed41
ae5f5fe
c6f7b49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ private Optional<RowData> processHttpResponse( | |
response, request, "endpoint", Collections.emptyMap() | ||
); | ||
} catch (PostRequestCallbackException e) { | ||
log.warn("Error during post request callback.", e); | ||
log.debug("Error during post request callback.", e); | ||
return Optional.empty(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we not throw an Exception here? There is already precedence as this method already throws throws IOException. Why is this not log.error - the text says Error? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same reason as below, I don't think there's a need to bubble up the exception, just treat this request as failed. |
||
} | ||
|
||
|
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.
should this be 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.
My goal behind raising a PostRequestCallbackException is to treat this particular request as failed. Any user who intentionally throws this exception would already be aware of the error from that particular request, so it doesn't feel like there's a need to log higher than debug.
Based on your comments on the PR, I think the naming of that exception class need to be iterated on, will give it a think 👍
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.
Renamed to FailedRequestException, lmk if this makes more sense 🙏