chore: Add logging to Salesforce#20167
Merged
Merged
Conversation
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (03/18/25)1 reviewer was added to this PR based on Keith Williams's automation. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
joeauyeung
commented
Mar 18, 2025
| if (error.name === "DUPLICATES_DETECTED") { | ||
| const existingId = this.getExistingIdFromDuplicateError(error); | ||
| if (existingId) { | ||
| console.log("Using existing record:", existingId); |
Contributor
Author
There was a problem hiding this comment.
Should be using the logger instead of console.log
Comment on lines
-833
to
+838
| console.error(e); | ||
| log.error(`Error ensuring fields ${fieldsToTest} exist on object ${sobject} with error ${e}`); |
Contributor
Author
There was a problem hiding this comment.
Same here, replacing console.log with logger
| }); | ||
| if (extractedText) { | ||
| writeOnRecordBody[field.name] = extractedText; | ||
| continue; |
Contributor
Author
There was a problem hiding this comment.
Since each field has one type these continue statements are called after the field is processed by it's respective field type function.
Comment on lines
+1118
to
+1122
| log.error( | ||
| `No value found for field ${field.name} with value ${ | ||
| personRecord[field.name] | ||
| }, field config ${JSON.stringify(fieldConfig)} and Salesforce config ${JSON.stringify(field)}` | ||
| ); |
Contributor
Author
There was a problem hiding this comment.
Additional error logging when a field isn't being written to. The Salesforce field config doesn't contain any PII. The only possible PII is the field value but we're already logging that.
Contributor
E2E results are ready! |
keithwillcode
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?