Skip to content

Clarify that TransportService#sendRequest never throws#89298

Merged
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2022-08-12-sendRequest-never-throws
Aug 12, 2022
Merged

Clarify that TransportService#sendRequest never throws#89298
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2022-08-12-sendRequest-never-throws

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

It's not obvious from reading the code that
TransportService#sendRequest and friends always catch exceptions and
pass them to the response handler, which means some callers are wrapping
calls to sendRequest in their own unnecessary try/catch blocks. This
commit makes it clear that all exceptions are handled and removes the
unnecessary exception handling in callers.

Closes #89274

It's not obvious from reading the code that
`TransportService#sendRequest` and friends always catch exceptions and
pass them to the response handler, which means some callers are wrapping
calls to `sendRequest` in their own unnecessary try/catch blocks. This
commit makes it clear that all exceptions are handled and removes the
unnecessary exception handling in callers.

Closes elastic#89274
@DaveCTurner DaveCTurner added >non-issue :Distributed/Network Http and internode communication implementations v8.5.0 labels Aug 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Aug 12, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner DaveCTurner merged commit ed940b6 into elastic:main Aug 12, 2022
@DaveCTurner DaveCTurner deleted the 2022-08-12-sendRequest-never-throws branch August 12, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Network Http and internode communication implementations >non-issue Team:Distributed Meta label for distributed team. v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid bubbling up exceptions from TransportService.sendRequest

3 participants