[TASK] show proper error before trying to deploy a dataExtension without fields

Open
#1,770 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
devops, devtools

Research direction

The issue identifies changeKeyValue/Field and DataExtension deployment as the relevant path; start by tracing how an empty Fields value reaches the Create request. Reproduce with Fields set to an empty string, then verify validation reports a useful error before any API request is sent.

Written by the indexing model from the issue text.

Description

c/dataExtension chore

this can happen after changeKeyValue/Field.

The Fields array is then set to empty string:

{ "Fields": "" }

API REQUEST body >>

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Body>
        <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Objects xsi:type="DataExtension">
                <CustomerKey>MyDEKey</CustomerKey>
                <Name>MyDEName</Name>
                <Description></Description>
                <IsSendable>false</IsSendable>
                <IsTestable>false</IsTestable>
                <Fields>
                    <Field></Field>
                </Fields>
                <CategoryID>24688</CategoryID>
                <RetainUntil></RetainUntil>
            </Objects>
        </CreateRequest>
    </Body>
    <Header>
        <fueloauth>*** TOKEN REMOVED ***</fueloauth>
    </Header>
</Envelope>

API RESPONSE body <<

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <soap:Header>
        <wsa:Action>CreateResponse</wsa:Action>
        <wsa:MessageID>urn:uuid:a72c9802-2154-4845-b4fd-a8f521360820</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:5c60054f-a2b3-411d-87e9-8820e3b90fe3</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id="Timestamp-ddb56305-3c3c-4a6b-9c48-f68e98e86740">
                <wsu:Created>2024-10-03T09:40:22Z</wsu:Created>
                <wsu:Expires>2024-10-03T09:45:22Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Results>
                <StatusCode>Error</StatusCode>
                <StatusMessage>Exception occurred during [Create] ErrorID: 26592023</StatusMessage>
                <OrdinalID>0</OrdinalID>
                <ErrorCode>2</ErrorCode>
                <NewID>0</NewID>
                <Object xsi:type="DataExtension">
                    <PartnerKey xsi:nil="true" />
                    <ObjectID xsi:nil="true" />
                    <CustomerKey>MyDEKey</CustomerKey>
                    <Name>MyDEName</Name>
                    <Description />
                    <IsSendable>false</IsSendable>
                    <IsTestable>false</IsTestable>
                    <RetainUntil />
                    <Fields>
                        <Field>
                            <PartnerKey xsi:nil="true" />
                            <ObjectID xsi:nil="true" />
                        </Field>
                    </Fields>
                    <CategoryID>24688</CategoryID>
                </Object>
            </Results>
            <RequestID>9639b845-da29-478d-b6e4-0458b9de1532</RequestID>
            <OverallStatus>Error</OverallStatus>
        </CreateResponse>
    </soap:Body>
</soap:Envelope>

11:40:22.357 error: ☇ error creating dataExtension 'MyDEKey': Exception occurred during [Create] ErrorID: 26592023 (Code 2)

Dominant language
JavaScript
Stars
166
Forks
50
Avg merge
11h 4m
Merged PRs (30d)
36

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Accenture/sfmc-devtools

All issues in Accenture/sfmc-devtools

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.