Skip to content

Commit

Permalink
Mark error Handler during error scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
arunans23 committed May 16, 2023
1 parent be07c71 commit 0c66741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public ClientWorker(TargetConfiguration targetConfiguration,
outMsgCtx.getProperty(PassThroughConstants.PASS_THROUGH_SOURCE_CONFIGURATION));
responseMsgCtx.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_IN_MESSAGES,
outMsgCtx.getProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_IN_MESSAGES));
responseMsgCtx.setProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN,
outMsgCtx.getProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN));

responseMsgCtx.setServerSide(true);
responseMsgCtx.setDoingREST(outMsgCtx.isDoingREST());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ public void responseReceived(NHttpClientConnection conn) {
// waiting on writing the request out, will get notified. And we will proceed with the response
// regardless of the http status code. But mark target and source connections to be closed.
informWriterError(conn);
requestMsgContext.setProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN,
PassThroughConstants.INTERNAL_ORIGIN_ERROR_HANDLER);
StatusLine errorStatus = response.getStatusLine();
if (errorStatus != null) {
TargetContext.updateState(conn, ProtocolState.REQUEST_DONE);
Expand Down

0 comments on commit 0c66741

Please sign in to comment.