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 laurit committed Jan 18, 2024
1 parent 00b52a9 commit f692585
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 f692585

Please sign in to comment.