Skip to content

Commit 8670a22

Browse files
committed
Address PR review comments for UID2-5185
- Removed 'please' from all error messages per documentation standards - Updated 'visit UID2 guides' to more specific wording - Added documentation link: https://unifiedid.com/docs/guides/integration-options-private-operator - Added E12 error code to CloudSyncVerticle.java (line 408) - Fixed punctuation and sentence structure in error messages - Updated test assertions to match new error message format
1 parent 43eb869 commit 8670a22

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/main/java/com/uid2/shared/attest/UidCoreClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private InputStream internalDownload(String path) throws CloudStorageException {
9494
} catch (Exception e) {
9595
throw new CloudStorageException(
9696
"E12: Data Download Failure - exception: " + e.getClass().getSimpleName() +
97-
". Please visit UID2 guides for troubleshooting", e);
97+
". For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.", e);
9898
}
9999
}
100100

@@ -113,7 +113,7 @@ private InputStream getWithAttest(String path) throws IOException, AttestationRe
113113
httpResponse = sendHttpRequest(path, attestationToken);
114114
if (httpResponse.statusCode() != 200) {
115115
throw new CloudStorageException(String.format(
116-
"E12: Data Download Failure - HTTP response code %d. Please visit UID2 guides for troubleshooting",
116+
"E12: Data Download Failure - HTTP response code %d. For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.",
117117
httpResponse.statusCode()));
118118
}
119119
return Utils.convertHttpResponseToInputStream(httpResponse);

src/main/java/com/uid2/shared/cloud/URLStorageWithMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public InputStream download(String cloudPath) throws CloudStorageException {
4949
return httpConn.getInputStream();
5050
} else {
5151
throw new CloudStorageException("E12: Data Download Failure - HTTP response code " + responseCode
52-
+ ". Please visit UID2 guides for troubleshooting");
52+
+ ". For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.");
5353
}
5454
}
5555
catch (CloudStorageException e) {
@@ -59,7 +59,7 @@ public InputStream download(String cloudPath) throws CloudStorageException {
5959
catch (Throwable t) {
6060
// Do not log the original exception as it may contain sensitive information such as the pre-signed URL
6161
throw new CloudStorageException("E12: Data Download Failure - exception: " + t.getClass().getSimpleName() +
62-
". Please visit UID2 guides for troubleshooting");
62+
". For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.");
6363
}
6464
}
6565

src/main/java/com/uid2/shared/vertx/CloudSyncVerticle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ private void cloudDownloadBlocking(String s3Path) throws Exception {
405405
if (ex instanceof CloudStorageException) {
406406
throw (CloudStorageException) ex;
407407
}
408-
throw new CloudStorageException("Failed to download file from cloud storage, exception: "
409-
+ ex.getClass().getSimpleName() + ", please check network connectivity and service availability");
408+
throw new CloudStorageException("E12: Data Download Failure - Failed to download file from cloud storage, exception: "
409+
+ ex.getClass().getSimpleName() + ". Check network connectivity and service availability.");
410410
}
411411
}
412412

src/test/java/com/uid2/shared/attest/UidCoreClientTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void Download_AttestInternalFail_ExceptionThrown() throws IOException, At
7272
CloudStorageException result = assertThrows(CloudStorageException.class, () -> {
7373
uidCoreClient.download("https://download");
7474
});
75-
String expectedExceptionMessage = "E12: Data Download Failure - exception: AttestationResponseHandlerException. Please visit UID2 guides for troubleshooting";
75+
String expectedExceptionMessage = "E12: Data Download Failure - exception: AttestationResponseHandlerException. For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.";
7676
assertEquals(expectedExceptionMessage, result.getMessage());
7777
}
7878

@@ -116,7 +116,7 @@ public void Download_Http403Error_LogsStatusCodeAndEndpoint() throws IOException
116116
"Should contain E12 error code"),
117117
() -> assertTrue(result.getMessage().contains("HTTP response code 403"),
118118
"Should contain HTTP status code 403"),
119-
() -> assertTrue(result.getMessage().contains("Please visit UID2 guides for troubleshooting"),
119+
() -> assertTrue(result.getMessage().contains("For troubleshooting information, refer to the applicable Private Operator guide"),
120120
"Should reference documentation")
121121
);
122122
}
@@ -185,7 +185,7 @@ public void Download_NetworkError_LogsExceptionType() throws IOException, Attest
185185
"Should contain E12 error code"),
186186
() -> assertTrue(result.getMessage().contains("exception: IOException"),
187187
"Should log exception type"),
188-
() -> assertTrue(result.getMessage().contains("Please visit UID2 guides for troubleshooting"),
188+
() -> assertTrue(result.getMessage().contains("For troubleshooting information, refer to the applicable Private Operator guide"),
189189
"Should reference documentation")
190190
);
191191
}

0 commit comments

Comments
 (0)