Skip to content

Conversation

@JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld JoernBerkefeld commented Mar 14, 2025

PR details

What changes did you make? (Give an overview)

Further details (optional)

...

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)

@JoernBerkefeld JoernBerkefeld added this to the 7.10.1 milestone Mar 14, 2025
@JoernBerkefeld JoernBerkefeld requested a review from Copilot March 14, 2025 14:33
@JoernBerkefeld JoernBerkefeld self-assigned this Mar 14, 2025
@github-actions github-actions bot added the chore Jira issue-type "Task" label Mar 14, 2025
@github-actions
Copy link

github-actions bot commented Mar 14, 2025

Coverage Report

Commit:ff3c5a5
Base: develop@ad4d820

Type Base This PR
Total Statements Coverage  70.82%  70.82%  (+0%)
Total Branches Coverage  70.82%  70.82%  (+0%)
Total Functions Coverage  83.53%  83.53%  (+0%)
Total Lines Coverage  70.82%  70.82%  (+0%)
Details (changed files):
File Statements Branches Functions Lines

@JoernBerkefeld JoernBerkefeld linked an issue Mar 14, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a 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');

@JoernBerkefeld JoernBerkefeld merged commit 9ce1adc into develop Mar 14, 2025
18 checks passed
@JoernBerkefeld JoernBerkefeld deleted the task/2168-handle-404-gracefully-for-delete-dataextension branch March 14, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/Generic chore Jira issue-type "Task"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] handle 404 gracefully for delete dataExtension

2 participants