Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Error response from NetSuite results in thrown error #154

Open
enocom opened this issue Nov 11, 2020 · 1 comment
Open

Error response from NetSuite results in thrown error #154

enocom opened this issue Nov 11, 2020 · 1 comment
Labels
enhancement New feature or request Future Milestone

Comments

@enocom
Copy link
Contributor

enocom commented Nov 11, 2020

When NetSuite responds in an unexpected way, this library throws an error. Stack trace and error message below.

{
    "errorType": "Error",
    "errorMessage": "Element [HTML] could not be unmarshalled as is not known in this context and the property does not allow DOM content.",
    "stack": [
        "Error: Element [HTML] could not be unmarshalled as is not known in this context and the property does not allow DOM content.",
        "    at Class.unmarshalElement (/var/task/node_modules/jsonix/jsonix.js:2003:11)",
        "    at Class.unmarshalDocument (/var/task/node_modules/jsonix/jsonix.js:2130:8)",
        "    at Class.unmarshalString (/var/task/node_modules/jsonix/jsonix.js:2089:15)",
        "    at deserializeSoapResponse (/var/task/node_modules/@stedi-oss/typesuite/lib/soap.js:50:41)",
        "    at Object.sendSoapRequest (/var/task/node_modules/@stedi-oss/typesuite/lib/soap.js:85:34)"
    ]
}
@BDQ BDQ added enhancement New feature or request Future Milestone labels Nov 16, 2020
@enocom
Copy link
Contributor Author

enocom commented Dec 1, 2020

We saw another example of this when NetSuite responded in an expected way.

First:

ERROR	[xmldom error]	invalid doc source @#[line:0,col:undefined]

And then:


{
    "errorType": "Error",
    "errorMessage": "Argument [undefined] does not exist.",
    "stack": [
        "Error: Argument [undefined] does not exist.",
        "    at Object.ensureExists (/var/task/node_modules/jsonix/jsonix.js:792:10)",
        "    at Class.initialize (/var/task/node_modules/jsonix/jsonix.js:1104:22)",
        "    at new Class (/var/task/node_modules/jsonix/jsonix.js:44:19)",
        "    at Class.unmarshalDocument (/var/task/node_modules/jsonix/jsonix.js:2124:15)",
        "    at Class.unmarshalString (/var/task/node_modules/jsonix/jsonix.js:2089:15)",
        "    at deserializeSoapResponse (/var/task/node_modules/@stedi-oss/typesuite/src/soap.ts:62:50)",
        "    at Object.sendSoapRequest (/var/task/node_modules/@stedi-oss/typesuite/src/soap.ts:109:28)",
        "    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
    ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Future Milestone
Projects
None yet
Development

No branches or pull requests

2 participants