Skip to content

Conversation

@lizk886
Copy link
Contributor

@lizk886 lizk886 commented Nov 13, 2025

No description provided.

@lizk886 lizk886 marked this pull request as ready for review November 17, 2025 08:31
if (ex instanceof CloudStorageException) {
throw (CloudStorageException) ex;
}
throw new CloudStorageException("Failed to download file from cloud storage, exception: "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add E12?

Copy link

@genwhittTTD genwhittTTD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some wording mods. LMK if any questions

throw new CloudStorageException("Cannot download required files, HTTP response code " + responseCode
+ ", please visit UID2 guides for more details");
throw new CloudStorageException("E12: Data Download Failure - HTTP response code " + responseCode
+ ". Please visit UID2 guides for troubleshooting");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly the same --

We don't generally say "please" in documentation.

People visit a site or a page but not a guide. Also, is it possible to include a link? If not a specific guide, you could link to the Private Operator overview page: https://unifiedid.com/docs/guides/integration-options-private-operator. Just a suggestion.

Suggestion for copy:

". For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.");

throw new CloudStorageException("download error: " + e.getMessage(), e);
throw new CloudStorageException(
"E12: Data Download Failure - exception: " + e.getClass().getSimpleName() +
". Please visit UID2 guides for troubleshooting", e);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't generally say "please" in documentation.

People visit a site or a page but not a guide. Also, is it possible to include a link? If not a specific guide, you could link to the Private Operator overview page: https://unifiedid.com/docs/guides/integration-options-private-operator. Just a suggestion.

Suggestion for copy:

". For troubleshooting information, refer to the applicable Private Operator guide: see https://unifiedid.com/docs/guides/integration-options-private-operator.", e);

(not sure about that trailing "e" but it's your code, I trust you have it correct).

if (httpResponse.statusCode() != 200) {
throw new CloudStorageException(String.format("Non-success response from core on request to %s. Status code: %d", path, httpResponse.statusCode()));
throw new CloudStorageException(String.format(
"E12: Data Download Failure - HTTP response code %d. Please visit UID2 guides for troubleshooting",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly the same --

We don't generally say "please" in documentation.

People visit a site or a page but not a guide. Also, is it possible to include a link? If not a specific guide, you could link to the Private Operator overview page: https://unifiedid.com/docs/guides/integration-options-private-operator. Just a suggestion.

Suggestion for copy:

"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.",

throw new CloudStorageException("Cannot download required files, exception: " + t.getClass().getSimpleName() +
", please visit UID2 guides for more details");
throw new CloudStorageException("E12: Data Download Failure - exception: " + t.getClass().getSimpleName() +
". Please visit UID2 guides for troubleshooting");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

throw (CloudStorageException) ex;
}
throw new CloudStorageException("Failed to download file from cloud storage, exception: "
+ ex.getClass().getSimpleName() + ", please check network connectivity and service availability");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like two sentences run into one. Plus there is no ending punctuation.

Suggest

", please check network connectivity and service availability");

to:

". Check network connectivity and service availability.");

uidCoreClient.download("https://download");
});
String expectedExceptionMessage = "download error: AttestationResponseCode: AttestationFailure, test failure";
String expectedExceptionMessage = "E12: Data Download Failure - exception: AttestationResponseHandlerException. Please visit UID2 guides for troubleshooting";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as earlier re "please" and guide wording.

"Should contain E12 error code"),
() -> assertTrue(result.getMessage().contains("HTTP response code 403"),
"Should contain HTTP status code 403"),
() -> assertTrue(result.getMessage().contains("Please visit UID2 guides for troubleshooting"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as earlier... please fix all instances and I won't mark any more :-)

() -> assertTrue(result.getMessage().contains("exception: IOException"),
"Should log exception type"),
() -> assertTrue(result.getMessage().contains("Please visit UID2 guides for troubleshooting"),
"Should reference documentation")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this "should" is... is that a message to customers as to what they should do? Let's not use "should" but instead just tell them what to do to remedy the error?

There are additional instances of "should" line 185 and 187 also. And 171 and perhaps earlier. Maybe I'm misunderstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants