Only log unexpected MRM retrieval errors

This commit is contained in:
Chris Eager 2025-02-14 13:11:40 -06:00 committed by Chris Eager
parent 6d30a45017
commit b203344ed4
2 changed files with 6 additions and 1 deletions

View File

@ -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();
}

View File

@ -18,4 +18,9 @@ class MrmDataMissingException extends NoStackTraceRuntimeException {
Type getType() {
return type;
}
@Override
public String toString() {
return "MrmDataMissingException{type=%s}".formatted(type);
}
}