-
Notifications
You must be signed in to change notification settings - Fork 42
Task/2168 handle 404 during deletions consistently across types #2188
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
Task/2168 handle 404 during deletions consistently across types #2188
Conversation
Coverage ReportCommit:ff3c5a5Base: develop@ad4d820
Details (changed files):
|
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 standardizes deletion methods across metadata types to handle 404 (not found) cases consistently by renaming parameters from “customerKey” to “key”, introducing an optional codeNotFound parameter, and using deleteNotFound for error handling.
- Updated SOAP and REST deletion methods to accept a codeNotFound parameter.
- Replaced direct error logging with calls to deleteNotFound across multiple metadata types.
- Updated jsdoc comments to reflect the new method signatures.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/metadataTypes/MetadataType.js | Updated deleteByKeySOAP and deleteByKeyREST to accept codeNotFound and use deleteNotFound consistently. |
| lib/metadataTypes/Event.js | Adjusted deleteByKey to pass the error code (30000) to the REST delete method. |
| lib/metadataTypes/DataExtension.js | Changed parameter naming and added codeNotFound (310007) in SOAP deletion. |
| lib/metadataTypes/FileTransfer.js | Updated deletion flow to use key naming and deleteNotFound on not found. |
| lib/metadataTypes/DataExtract.js | Standardized deletion method signatures and error handling. |
| lib/metadataTypes/ImportFile.js | Standardized parameter naming and deletion error handling. |
| lib/metadataTypes/Query.js | Adjusted deleteByKey to use key naming and call deleteNotFound on missing object IDs. |
| lib/metadataTypes/Script.js | Adjusted deleteByKey to use key naming and consistent error handling. |
| lib/metadataTypes/Journey.js | Replaced warning logs with deleteNotFound calls for not found journeys. |
| lib/metadataTypes/MobileMessage.js | Removed extraneous flag parameter from deleteByKeyREST calls. |
| lib/metadataTypes/TransactionalMessage.js | Updated deletion call to pass key correctly using the new signature. |
| lib/metadataTypes/MobileKeyword.js | Updated deletion handling to call deleteNotFound when local metadata is missing. |
| lib/metadataTypes/Automation.js | Adjusted deletion flow to call deleteNotFound; review suggested for parameter consistency. |
| lib/metadataTypes/TransactionalEmail.js | Updated deletion call to use key naming and removed unnecessary flag parameter. |
| lib/metadataTypes/Asset.js | Standardized deletion error handling and use of deleteNotFound on missing assets. |
Comments suppressed due to low confidence (1)
lib/metadataTypes/Automation.js:1816
- The deleteByKeySOAP call in Automation.js does not include the codeNotFound parameter. Consider adding the codeNotFound argument to align with the updated deletion pattern and handle 404 errors consistently.
return super.deleteByKeySOAP(key, 'CustomerKey');
PR details
What changes did you make? (Give an overview)
Further details (optional)
...
Checklist