-
Notifications
You must be signed in to change notification settings - Fork 6
fix source api error logging #997
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes error logging for source API errors by changing from implicit toString() on byte array content to explicit string conversion. The change ensures that error messages from source APIs are properly readable in logs instead of displaying unreadable byte array representations.
- Changes error logging to use
getContentAsString()instead ofgetContent()for better readability
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // write error, which shouldn't contain PII, directly | ||
| log.log(Level.WARNING, "Source API Error " + original.getContent()); | ||
| log.log(Level.WARNING, "Source API Error " + original.getContentAsString()); | ||
|
|
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Adding an empty line after the log statement is inconsistent with the existing code style. The empty line should be removed to maintain consistency with the surrounding code formatting.
| import java.util.function.Supplier; | ||
| import java.util.logging.Level; | ||
| import java.util.regex.Pattern; | ||
| import java.util.stream.Collectors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh - not sure why cursor likes to organize imports so aggressively
* update release refs to rc-v0.5.10 * fix source api error logging (#997) * Fix rules for room participant history (#993) * Updated rules * Updated rule for isMove * Updated test result * clarify HTTP request header handling (#992) * add some clarity to header handling * improve naming of it on endpoint * fix rename * fix bulk test case (#998) * improve Google Workspace API key management (#999) * expose configurable google workspace key rotation; implement it in a better way * Update infra/examples-dev/gcp/google-workspace-variables.tf Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * documentation cleanup + fixes (#996) * document some additional bulk file settings * some fixes for jira/confluence docs * fix passing through columnsToPseudonymizeIfPresent; add tests to cover that; generalize module testing infra * test the gcp-host module * doc zoom Server-to-Server OAuth app creation perm in roles * line-wrapping in zoom docs * doc requirement for Cloudscheduler admin; and note that it's only least-privileged extant role; a less-privileged custom role is possible * fix test file per bugbot suggestion * document 'applyOnlyWhen' * try to fix test for tf 1.6.x * add CI coverage of more recent tf versions * typo in salesfroce docs * recover gcp-host CI mock provider, so tests run * fix implicit code syntax * avoid msft test example TODO churn on every terraform apply (#1001) * avoid excessive todo churn * Update infra/modules/worklytics-connectors-msft-365/main.tf Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix variable name (#1003) * tool improvements (#994) * improve tooling to warn user if repo checkout dir does not exist * warn user if didn't pass in version * provide suggestion to do terraform init --upgrade * to ease publishing, bring example repos READMEs into main one * monorepo instructions * Update tools/upgrade-terraform-modules.sh Co-authored-by: Copilot <[email protected]> * Update infra/examples-dev/aws/README_to_publish.md Co-authored-by: Jose Lorenzo <[email protected]> * Update infra/examples-dev/aws/README_to_publish.md Co-authored-by: Jose Lorenzo <[email protected]> * Update infra/examples-dev/aws/README_to_publish.md Co-authored-by: Jose Lorenzo <[email protected]> * Update infra/examples-dev/aws/README_to_publish.md Co-authored-by: Jose Lorenzo <[email protected]> * Update infra/examples-dev/gcp/README_to_publish.md Co-authored-by: Jose Lorenzo <[email protected]> * fix version refs in example readme --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Jose Lorenzo <[email protected]> * Support rateLimit object in GitHub GraphQL (#1002) * Updated example with rateLimit * Updated rules * Updated YAML * Updated CHANGELOG.md * fix GCP Storage SA pub/sub role grant (#1000) * bucket write role conditional on bulk_mode being enabled * remove unused deprescated values; inputs/outputs that shouldn't be relevant * revert conditional custom_role thing; not helpful in practice * commit the depends_on * avoid failing test * better encryption key rotation feedback (#1004) * approach to given better token decryption errors * .gitignore to avoid copilot config files atm * Better name, add TODO * fix compile * better split up error cases * fix type * fix weird import/ref * add configurable gcp bulk run timeout (#1008) * configurable timeout for gcp bulk case * fix style * Update infra/modules/gcp-host/main.tf Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * GCS object write replay tool (#1007) * script to replay gcs writes on a bucket * move the tool * perms feedback * fix leading whitespacE * single object case * be flexible on uri format * Update tools/gcp/replay-gcs-writes.sh Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * eliminate tf runner exotic detection (#1006) * avoid non-determinism, although this breaks if NOT auth'd as a service account * wip of DROPPING data.external, which is hack; and data.google_service_account_id_token, which fails in some cases - but can't be easily conditioned pre-apply * add some comments * refactor to flatten/simplify module structure * drop module that's been deprecated since 0.4.19, at least * todo, recover the test * recover conditional service_account thing, trying to avoid breaking changes * Update Jira scopes * Access token not required * Update jira docs * Update confluence docs * Update jira permissions links * Updated changelog * Fixed docs --------- Co-authored-by: Erik Schultink <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Jose Lorenzo <[email protected]>
Fixes
byte[], the implicit toString() means it's not readable in logsChange implications