Skip to content

Commit 82b08ba

Browse files
Merge pull request #231 from ersaxenas/bug-fix-null-pointer-during-ack
Adding null check for error code
2 parents cda5934 + 1355cf3 commit 82b08ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ private JMSException handleException(SdkException e, String operationName) {
377377
}
378378

379379
private static String errorCode(AwsServiceException e) {
380-
return e.awsErrorDetails() != null ? e.awsErrorDetails().errorCode() : "";
380+
return e.awsErrorDetails() != null && e.awsErrorDetails().errorCode() != null ? e.awsErrorDetails().errorCode() : "";
381381
}
382382

383383

0 commit comments

Comments
 (0)