Skip to content

Commit

Permalink
exception handling
Browse files Browse the repository at this point in the history
Signed-off-by: Pranshu-G <pranshu.grover18@gmail.com>
  • Loading branch information
Pranshu-G committed Sep 6, 2022
1 parent 36166a1 commit 65cc533
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -64,8 +64,7 @@ public List<Adaptable> map(final ExternalMessage message) {
MessageMappingFailedException mappingFailedException = MessageMappingFailedException.newBuilder(
message.findContentType().orElse("")).description("This is not a CloudEvent")
.dittoHeaders(DittoHeaders.of(message.getHeaders())).build();
final String contentType = message.findContentType().orElse(null);
if (contentType.equals(CONTENT_TYPE)) {
if (message.findContentType().orElse("").equals(CONTENT_TYPE)) {
final String payload = extractPayloadAsString(message);
try {
if (isBinaryCloudEvent(message)) {
Expand Down

0 comments on commit 65cc533

Please sign in to comment.