Skip to content

Commit

Permalink
Merge pull request wso2#2096 from arunans23/bny-logs-improvement
Browse files Browse the repository at this point in the history
Mark error Handler during error scenario
  • Loading branch information
malakaganga authored May 16, 2023
2 parents 503acda + 0c66741 commit e392181
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 @@ -387,6 +387,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 e392181

Please sign in to comment.