Response can be null in afterError of LoggingAwareRequestHandler in S3
This commit is contained in:
parent
3e36de814d
commit
50fbec1bae
@ -72,12 +72,16 @@ class S3ClientFactory {
|
||||
|
||||
@Override
|
||||
public void afterError(Request<?> request, Response<?> response, Exception e) {
|
||||
Timber.tag("S3Client").e( //
|
||||
e,
|
||||
"Error occurred (%s) with status %s (%s)", //
|
||||
request.getAWSRequestMetrics().getTimingInfo().getStartTimeNano(), //
|
||||
response.getHttpResponse().getStatusText(), //
|
||||
response.getHttpResponse().getStatusCode());
|
||||
if (response != null) {
|
||||
Timber.tag("S3Client").e( //
|
||||
e, //
|
||||
"Error occurred (%s) with status %s (%s)", //
|
||||
request.getAWSRequestMetrics().getTimingInfo().getStartTimeNano(), //
|
||||
response.getHttpResponse().getStatusText(), //
|
||||
response.getHttpResponse().getStatusCode());
|
||||
} else {
|
||||
Timber.tag("S3Client").e(e, "Error occurred (%s)", request.getAWSRequestMetrics().getTimingInfo().getStartTimeNano());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user