Skip to content

Commit

Permalink
Null check for nullable response object (open-telemetry#10029)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaurushGarg authored and zeitlinger committed Dec 12, 2023
1 parent 1ea40cf commit 75dfd7a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static String getMessageAttribute(Request<?> request, String name) {
}

static String getMessageId(Response<?> response) {
if (response.getAwsResponse() instanceof SendMessageResult) {
if (response != null && response.getAwsResponse() instanceof SendMessageResult) {
return ((SendMessageResult) response.getAwsResponse()).getMessageId();
}
return null;
Expand Down

0 comments on commit 75dfd7a

Please sign in to comment.