Only log unexpected MRM retrieval errors

This commit is contained in:
Chris Eager authored and Chris Eager committed 2025-02-18 10:45:04 -06:00
1 parent 6d30a45017
commit b203344ed4
2 files changed
+6 -1

No files matched your search

@@ -455,7 +455,6 @@ public class MessagesCache {
}
})
.onErrorResume(throwable -> {
logger.warn("Failed to retrieve shared mrm data", throwable);
final List<Tag> tags = new ArrayList<>();
tags.add(Tag.of(EPHEMERAL_TAG_NAME, String.valueOf(mrmMessage.getEphemeral())));
@@ -467,6 +466,7 @@ public class MessagesCache {
// MRM data) fails after it has been delivered. We return it so that it may be discarded from the queue.
result = Mono.just(mrmMessage.toBuilder().setSharedMrmKey(STALE_MRM_KEY).build());
} else {
logger.warn("Failed to retrieve shared mrm data", throwable);
// For unexpected errors, return empty. The message will remain in the queue and be retried in the future.
result = Mono.empty();
}
@@ -18,4 +18,9 @@ class MrmDataMissingException extends NoStackTraceRuntimeException {
Type getType() {
return type;
}
@Override
public String toString() {
return "MrmDataMissingException{type=%s}".formatted(type);
}
}