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
I believe the initial thought with the following code calling ensureStatusNotFailure was that the offending function in the operation would be status=failure and any other proceeding functions status=aborted.
Unfortunately this isn't the case when the request's operation.transaction=true. All functions are returned with status=aborted and the offending function has a result.errors.length > 0. It looks like this is a similar problem on the other SDK's as well.
fixed-sample.js
letrequestConfig=newIA.RequestConfig();requestConfig.transaction=true;constbufferResponse=awaitintacctClient.executeBatch(apiFunctions,requestConfig);for(constresultofbufferResponse.results){if(result.status!=='success'&&result.errors.length>0){thrownewResultException("Result status: "+result.status+" for Control ID: "+result.controlId,result.errors);}}
When you run executeBatch with the transaction attribute set to true,
I believe the initial thought with the following code calling ensureStatusNotFailure was that the offending function in the operation would be status=failure and any other proceeding functions status=aborted.
https://github.com/Intacct/intacct-sdk-js/blob/bdadac479a3ac6c8b2a34e5429b1ddf3afa740f1/src/Xml/Response/Result.ts#L186-L193
Unfortunately this isn't the case when the request's operation.transaction=true. All functions are returned with status=aborted and the offending function has a result.errors.length > 0. It looks like this is a similar problem on the other SDK's as well.
fixed-sample.js
Sample XML request for Postman
Sample XML response
The text was updated successfully, but these errors were encountered: