Skip to content

Commit

Permalink
Merge pull request #1915 from Accenture/bug/1914-trying-to-delete-a-d…
Browse files Browse the repository at this point in the history
…ataextension-that-doesnt-exist-returns-ambiguous-error

bug/1914 make dataExtension not found error easier to understand when trying to delete
  • Loading branch information
JoernBerkefeld authored Dec 4, 2024
2 parents 7535c95 + 840bd6c commit dfb82fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/MetadataType.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/metadataTypes/MetadataType.js
Original file line number Diff line number Diff line change
Expand Up @@ -2466,7 +2466,9 @@ class MetadataType {
} else {
const errorMsg = ex?.results?.length
? `${ex.results[0].StatusMessage} (Code ${ex.results[0].ErrorCode})`
: ex.message;
: ex?.json?.Results?.length
? `${ex.json.Results[0].StatusMessage} (Code ${ex.json.Results[0].ErrorCode})`
: ex.message;
Util.logger.error(
` - Deleting ${this.definition.type} '${customerKey}' failed: ${errorMsg}`
);
Expand Down

0 comments on commit dfb82fb

Please sign in to comment.