I am facing an issue with error handling while importing XML data into TallyPrime. In TallyPrime 2.1, when I send the following XML request:
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>All Masters</REPORTNAME>
<STATICVARIABLES><IMPORTDUPS>Modify with new data</IMPORTDUPS></STATICVARIABLES>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER VCHTYPE="Local Purchase [GST]" ACTION="CREATE">
<VOUCHERTYPENAME>Local Purchase [GST]</VOUCHERTYPENAME>
<VOUCHERNUMBER>PURC-INV-1</VOUCHERNUMBER>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
If the Voucher Type "Local Purchase [GST]" does not exist, TallyPrime 2.1 returns this response:
<RESPONSE>
<LINEERROR>Voucher Type 'Local Purchase [GST]' does not exist!</LINEERROR>
<CREATED>0</CREATED>
<ALTERED>0</ALTERED>
<DELETED>0</DELETED>
<LASTVCHID>0</LASTVCHID>
<LASTMID>0</LASTMID>
<COMBINED>0</COMBINED>
<IGNORED>0</IGNORED>
<ERRORS>1</ERRORS>
<CANCELLED>0</CANCELLED>
</RESPONSE>
This is correct since the error message clearly states the issue. However, in TallyPrime 3.0 and later versions, when I send the same XML, I receive the following response:
<RESPONSE>
<LINEERROR/>
<CREATED>0</CREATED>
<ALTERED>0</ALTERED>
<DELETED>0</DELETED>
<LASTVCHID>0</LASTVCHID>
<LASTMID>0</LASTMID>
<COMBINED>0</COMBINED>
<IGNORED>0</IGNORED>
<ERRORS>1</ERRORS>
<CANCELLED>0</CANCELLED>
</RESPONSE>
The problem here is that <LINEERROR/>
is empty, making it impossible to determine what caused the error. This issue did not exist in TallyPrime 2.1.
Is this a known issue in TallyPrime 3.0 and later versions? How can I retrieve meaningful error messages like in version 2.1? Is there a configuration change or workaround available to ensure that provides the actual error details?
Looking forward to your guidance.