I am getting intermittent issue of validation error in ESign Live using Apex SDK
Tuesday, May 10, 2016 at 06:01amI am using Apex SDK for one of our project in Salesforce and it does work while uploading document binaries. However, randomly on certain times it creates a validation error. This error has something to do with emails because by changing email address this error goes away. I am copying here a JSON response that we get on error. This error is intermittent and only occur randomly. We are trying to get rid of this issues. Any help would be greatly appreciated.
We are using a common Sandbox and we do send Sender Id in our request. This error is related to emails for sure. But no description is returned with the error. The same request works sometimes and does not works sometimes.
{"packageId":null,"messageKey":"http.status.400","technical":"","entity":null,"message":"Validation Error","code":400,"name":"Validation Error"}
Reply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Tuesday, May 31, 2016 at 04:32am------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="file"; filename="appfile" Content-Type: application/pdf [File data removed] ------WebKitFormBoundary1bNO60n7FqP5WO4t Content-Disposition: form-data; name="payload" {"status":"SENT","sender":{"id":"senderidinesignlive","email":"[email protected]"},"roles":[{"type":"SIGNER","signers":[{"title":"Consultant","phone":"(506) 756-2382","name":"sender","lastName":"Test","language":"en","firstName":"eSignature","email":"[email protected]","delivery":{"provider":false,"email":false,"download":true},"company":"Company co","auth":{"scheme":"NONE"}}],"reassign":false,"locked":false,"index":0,"id":"Signer_Applicant","emailMessage":{"content":""}},{"type":"SIGNER","signers":[{"title":"Consultant","phone":"(506) 756-2381","name":"sender","lastName":"Tester","language":"en","firstName":"eSignature","email":"[email protected]","delivery":{"provider":false,"email":false,"download":true},"company":"Company co","auth":{"scheme":"NONE"}}],"reassign":false,"locked":false,"index":0,"id":"Signer_Payor","emailMessage":{"content":""}},{"type":"SENDER","signers":[{"title":"Consultant","name":"sender","lastName":"Saleswoman","language":"en","firstName":"Jenny","email":"[email protected]","delivery":{"provider":false,"email":false,"download":true},"company":"Company co","auth":{"scheme":"NONE"}}],"reassign":false,"locked":false,"index":0,"id":"Signer_Agent","emailMessage":{"content":""}}],"opportunityId":"0061100000CnCLMAA3","name":"eSignature Test_1_Document","emailMessage":" ","due":"2016-08-13T18:50:09.330Z","documents":[{"name":"Individual Dental Plan_Application","extract":true,"approvals":[{"role":"Signer_Applicant","name":"Application_0","fields":[{"type":"SIGNATURE","subtype":"FULLNAME","extractAnchor":{"width":175,"topOffset":-110,"text":"Signature of Applicant","leftOffset":0,"index":0,"height":40,"characterIndex":0,"anchorPoint":"TOPLEFT"},"extract":false},{"type":"INPUT","subtype":"LABEL","extractAnchor":{"width":150,"topOffset":-80,"text":"Signature of Applicant","leftOffset":0,"index":0,"height":20,"characterIndex":0,"anchorPoint":"BOTTOMLEFT"},"extract":false,"binding":"{approval.signed}"}]},{"role":"Signer_Payor","name":"Application_1","fields":[{"type":"SIGNATURE","subtype":"FULLNAME","extractAnchor":{"width":175,"topOffset":-100,"text":"Signature(s) of Bank Account","leftOffset":240,"index":0,"height":40,"characterIndex":0,"anchorPoint":"TOPLEFT"},"extract":false},{"type":"INPUT","subtype":"LABEL","extractAnchor":{"width":150,"topOffset":-70,"text":"Signature(s) of Bank Account","leftOffset":240,"index":0,"height":20,"characterIndex":0,"anchorPoint":"BOTTOMLEFT"},"extract":false,"binding":"{approval.signed}"}]},{"role":"Signer_Agent","name":"Application_2","fields":[{"type":"SIGNATURE","subtype":"FULLNAME","extractAnchor":{"width":175,"topOffset":-100,"text":"Agent's Signature","leftOffset":150,"index":0,"height":40,"characterIndex":0,"anchorPoint":"TOPLEFT"},"extract":false},{"type":"INPUT","subtype":"LABEL","extractAnchor":{"width":150,"topOffset":-70,"text":"Agent's Signature","leftOffset":150,"index":0,"height":20,"characterIndex":0,"anchorPoint":"BOTTOMLEFT"},"extract":false,"binding":"{approval.signed}"}]}]}],"description":" ","autocomplete":true} B�KKKKKU�X��]�ܛP��[�\�LX��͌�ќT U��KWhat is interesting about the request is the boundary at the very end; there seems to be an issue with the encoding. On other requests, the footer boundary looks normal : ------WebKitFormBoundary1bNO60n7FqP5WO4t-- In what situation would that piece not encode properly ? ThanksReply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Monday, May 16, 2016 at 01:16pmReply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Tuesday, May 31, 2016 at 05:15amReply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Wednesday, June 1, 2016 at 10:58am/** * Method to encode the content passed */ public static String encodeContent(String content) { String contentEncoded = EncodingUtil.base64Encode(Blob.valueOf(content + '\r\n')); String last4BytesForContent = contentEncoded.substring(contentEncoded.length()-4,contentEncoded.length()); if(contentEncoded.endsWith('==')) { last4BytesForContent = last4BytesForContent.substring(0,2) + '0K'; contentEncoded = contentEncoded.substring(0,contentEncoded.length()-4) + last4BytesForContent; } return contentEncoded; }AFTER:/** * Method to encode the content passed */ public static String encodeContent(String content) { String contentEncoded = EncodingUtil.base64Encode(Blob.valueOf(content + '\r\n')); String last4BytesForContent = contentEncoded.substring(contentEncoded.length()-4,contentEncoded.length()); if(contentEncoded.endsWith('==')) { last4BytesForContent = last4BytesForContent.substring(0,2) + '0K'; contentEncoded = contentEncoded.substring(0,contentEncoded.length()-4) + last4BytesForContent; } else if( last4BytesForContent.endsWith('=')) { last4BytesForContent = last4BytesForContent.substring(0,3) + 'N'; contentEncoded = contentEncoded.substring(0,contentEncoded.length()-4) + last4BytesForContent; } return contentEncoded; }This might not cover all scenarios, but it's progress.Reply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Wednesday, June 1, 2016 at 11:04amReply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Friday, June 3, 2016 at 09:49amReply to: I am getting intermittent issue of validation error in ESign Live using Apex SDK
Friday, June 3, 2016 at 10:07am