From 0b84edaca275560918141a984b07d0d5bdc61aa9 Mon Sep 17 00:00:00 2001 From: Herman Wika Horn Date: Fri, 22 Mar 2024 10:00:26 +0100 Subject: [PATCH] Error code for duplicate document in same batch It can be useful to distinguish between this new error code and the existing DUPLICATE_DOCUMENT_ID error code when using the batch functionality of the Digipost API. This new error code is a special case of duplicate uuid for which the duplicate is part of the same batch, and has the same document hash, as the message which generated the error. In such cases, it is safe for the sender to assume the message has already been submitted as part of the batch. This requires that the document hash property is specified correctly. --- .../java/no/digipost/api/client/errorhandling/ErrorCode.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/no/digipost/api/client/errorhandling/ErrorCode.java b/src/main/java/no/digipost/api/client/errorhandling/ErrorCode.java index 5db0edd1..aeb58df8 100644 --- a/src/main/java/no/digipost/api/client/errorhandling/ErrorCode.java +++ b/src/main/java/no/digipost/api/client/errorhandling/ErrorCode.java @@ -99,6 +99,7 @@ public enum ErrorCode { CONTENT_OF_PRINT_MESSAGE_MUST_BE_PDF(CLIENT_DATA), DUPLICATE_MESSAGE(CLIENT_DATA), DUPLICATE_DOCUMENT_ID(CLIENT_DATA), + DUPLICATE_DOCUMENT_ID_FOR_BATCH(CLIENT_DATA), FILE_TOO_LARGE(CLIENT_DATA), ILLEGAL_HTML_CONTENT(CLIENT_DATA), BAD_CONTENT(CLIENT_DATA),