Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(log/docs): improve error log, docs #7239

Merged
merged 2 commits into from
Feb 3, 2023
Merged

Conversation

anshbansal
Copy link
Collaborator

  • Exception log was incomplete which made it hard to see what is happening.
  • Restore indices endpoint API doc was hard to find. Moved it under Rest.li docs.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@anshbansal anshbansal requested review from pedro93 and szalai1 February 3, 2023 09:52
@github-actions github-actions bot added devops PR or Issue related to DataHub backend & deployment docs Issues and Improvements to docs labels Feb 3, 2023
@@ -97,7 +97,7 @@ public Task<AnyRecord> get(@Nonnull String urnStr, @QueryParam("aspect") @Option
return RestliUtil.toTask(() -> {
final VersionedAspect aspect = _entityService.getVersionedAspect(urn, aspectName, version);
if (aspect == null) {
throw RestliUtil.resourceNotFoundException();
throw RestliUtil.resourceNotFoundException(String.format("Did not find urn: %s aspect: %s version: %s", urn, aspectName, version));
Copy link
Contributor

Choose a reason for hiding this comment

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

concern: adding the urn to exceptionmessages, can leak PII

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The URN in question is passed in as input parameter. So the caller already has knowledge of the URN and thus the PII. The URN is being logged few lines above either way. It just makes it possible to connect the URN with the exception.

Copy link
Contributor

@szalai1 szalai1 left a comment

Choose a reason for hiding this comment

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

Thanks for the docs 🙌

@anshbansal anshbansal merged commit aa4c6fc into master Feb 3, 2023
@anshbansal anshbansal deleted the aseem-misc-fixes branch February 3, 2023 12:13
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
oleg-ruban pushed a commit to RChygir/datahub that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment docs Issues and Improvements to docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants