You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
element: { Error: Element 'Reporting': This element is not expected. Expected is one of ( DirectReporting, IndirectReporting ).
at Schema.validate (/obfuscated/node_modules/libxmljs2-xsd/index.js:68:33)
at /obfuscated/dist/utils/xml.js:37:51
at new Promise (<anonymous>)
at Object.orchestrateXML (/obfuscated/dist/utils/xml.js:12:12)
at Object.<anonymous> (/obfuscated/dist/utils/orchestrate.js:62:52)
at step (/obfuscated/dist/utils/orchestrate.js:33:23)
at Object.next (/obfuscated/dist/utils/orchestrate.js:14:53)
at /obfuscated/dist/utils/orchestrate.js:8:71
at new Promise (<anonymous>)
at __awaiter (/obfuscated/dist/utils/orchestrate.js:4:12) domain: 17, code: 1871, level: 2, column: 0, line: 65535 }
Is there any workaround to capturing the error message from the validationErrors array?
I have been looking into your source and src/xml_errors.cc builds these error messages, So I was thinking of injecting quotes and commas so that I can work with those messages in javascript.
Let me know, willing to assist but will need some guidance on the C side of things.
UPDATE:
I am using my fork with this output :
element: { domain: 17,
code: 1871,
message: 'Element \'Reporting\': This element is not expected. Expected is one of ( DirectReporting, IndirectReporting ).\n',
level: 2,
column: 0,
line: 65535 }
The text was updated successfully, but these errors were encountered:
Hi gotama,
First of all, thanks for your interest and contribution.
Sorry for the late answer, I had some off-time.
The way you report errors seems indeed much more appropriate.
I'll be lloking at your PR today.
Here is my execution :
which outputs
However when I run the below code I then get my XSD documented error messages.
which outputs
Is there any workaround to capturing the error message from the validationErrors array?
I have been looking into your source and src/xml_errors.cc builds these error messages, So I was thinking of injecting quotes and commas so that I can work with those messages in javascript.
Let me know, willing to assist but will need some guidance on the C side of things.
UPDATE:
I am using my fork with this output :
The text was updated successfully, but these errors were encountered: