Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoox committed Dec 18, 2024
1 parent 5dc5aae commit 1033e04
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ public void logResponse(RequestLog log) {
responseLogLevel.log(logger, logFormatter.formatRequest(log));
}

if (responseCause == null) {
responseLogLevel.log(logger, responseStr);
return;
}
if (responseCauseFilter.test(ctx, responseCause)) {
if (responseCause == null || responseCauseFilter.test(ctx, responseCause)) {
responseLogLevel.log(logger, responseStr);
} else {
responseLogLevel.log(logger, responseStr, responseCause);
Expand All @@ -135,8 +131,9 @@ static boolean isSuccess(RequestLog log) {
} else if (ctx instanceof ServiceRequestContext) {
successFunction = ((ServiceRequestContext) ctx).config().successFunction();
} else {
throw new IllegalStateException(
ctx + " is neither ClientRequestContext nor ServiceRequestContext");
throw new IllegalArgumentException(
ctx + " is neither " + ClientRequestContext.class.getSimpleName() + " nor " +
ServiceRequestContext.class.getSimpleName());
}
return successFunction.isSuccess(ctx, log);
}
Expand Down

0 comments on commit 1033e04

Please sign in to comment.