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
When creating a package and attaching documents with Blob data from Attachments and Documents I was receiving the following error.
12:32:30:969 EXCEPTION_THROWN [683]|ESignLiveRESTAPIHelper.ESignLiveRestAPIHelperException: Error creating eSignLive package with documents: 400 - Bad Request - {"messageKey":"error.validation.createProcess.missingData","message":"Missing process definition.","code":400,"name":"Validation Error"}
I was able to reproduce the error in ESignLiveExamples.createPackageWithDocumentsExample() by changing the value of BLob b2 from "test" to "test test" like so:
After adding some debug logging to EsignLiveSDK.createPackageWithBinaries() I was able to trace the problem by decoding the base64 encoded multipart form data which showed that the boundary between the last document and the package payload was not prefixed by a newline, causing it to be read as part of the line before it.
When creating a package and attaching documents with Blob data from
Attachments
andDocuments
I was receiving the following error.I was able to reproduce the error in
ESignLiveExamples.createPackageWithDocumentsExample()
by changing the value ofBLob b2
from "test" to "test test" like so:And then running the following Anonymous Apex:
After adding some debug logging to
EsignLiveSDK.createPackageWithBinaries()
I was able to trace the problem by decoding the base64 encoded multipart form data which showed that the boundary between the last document and the package payload was not prefixed by a newline, causing it to be read as part of the line before it.This is the encoded form data:
Which decodes to
The problem is resolved by adding a newline in
ESignLiveSDK.createPackageWithBinaries()
by prefixing the value ofString secondHeader
with a newline:The same fix is applied to
ESignLiveSDK.createDocumentWithBinariesAndFields()
as well.The text was updated successfully, but these errors were encountered: