Account
I am a
Developer
Product(s)
Earned badges
Achievement: Latest Unlocked
Preferences
Replies
Topics Started
Topic Started
Topics |
---|
User is receiving error:
02/25/2019 08:35:41.00: Could not upload documents to package. Exception: The remote server returned an error: (400) Bad Request.
|
Our client is receiving the above error message when trying to send a package. We are not creating and sending a CustomID, so not sure what the problem is.
|
Replies Created
Reply to: User getting error "No Role found for signer email [email address]"
Thursday, February 28, 2019 at 04:43amHi,
There is no package ID; the package does not get created because of the error message.
The real mystery is why this only happens very occasionally; 99% of the packages are created with no problem.
Here is the code from creating the signer to the line where the error occurs:
try
{
foreach (CtxRecipientInfo signer in signers)
{
SignerBuilder newSigner = SignerBuilder.NewSignerWithEmail(signer.email)
.WithFirstName(signer.firstName)
.WithLastName(signer.lastname)
.WithTitle(signer.title)
//.WithCustomId(signer.ID)
.SigningOrder(signer.signingOrder)
.WithEmailMessage(signer.emailMessage);
pkg.WithSigner(newSigner);
}
}
catch (Exception ex)
{
errorMessage = ex.Message;
PortalUtils.WriteToLogfile(errorMessage, "");
PortalUtils.WriteToLogfile(ex.StackTrace, "");
throw;
}
}
///
/// Add signature section for the given signer (idenified by email address)
///
///
///
public void AddSignatureToDocument(DocumentBuilder document, CtxRecipientInfo signer)
{
try
{
if (signer.recipientType == CtxRecipientInfo.RecipientType.AcceptOnly)
{
AddAcceptOnly(document, signer);
}
else
{
TextAnchor sigAnchor = new TextAnchor();
sigAnchor.Position = TextAnchorPosition.TOPLEFT;
sigAnchor.YOffset = signer.yOffset;
sigAnchor.XOffset = signer.xOffset;
sigAnchor.Height = signer.height;
sigAnchor.Width = signer.width;
sigAnchor.AnchorText = signer.anchorText;
TextAnchor dateAnchor = new TextAnchor();
dateAnchor.Position = TextAnchorPosition.TOPLEFT;
dateAnchor.YOffset = signer.signingDateInfo.yOffset;
dateAnchor.XOffset = signer.signingDateInfo.xOffset;
dateAnchor.Height = signer.signingDateInfo.height;
dateAnchor.Width = signer.signingDateInfo.width;
dateAnchor.AnchorText = signer.signingDateInfo.anchorText;
TextAnchor titleAnchor = new TextAnchor();
titleAnchor.Position = TextAnchorPosition.TOPLEFT;
titleAnchor.YOffset = signer.signingTitle.yOffset;
titleAnchor.XOffset = signer.signingTitle.xOffset;
titleAnchor.Height = signer.signingTitle.height;
titleAnchor.Width = signer.signingTitle.width;
titleAnchor.AnchorText = signer.signingTitle.anchorText;
document.WithSignature(SignatureBuilder.SignatureFor(signer.email)
.WithPositionAnchor(sigAnchor)
.WithField(FieldBuilder.SignerTitle()
.WithPositionAnchor(titleAnchor))
.WithField(FieldBuilder.SignatureDate()
.WithPositionAnchor(dateAnchor)));
}
}
catch (Exception ex)
{
errorMessage = ex.Message;
PortalUtils.WriteToLogfile(errorMessage, "");
PortalUtils.WriteToLogfile(ex.StackTrace, "");
throw;
}
}
///
///
///
///
///
public void AddAcceptOnly(DocumentBuilder document, CtxRecipientInfo signer)
{
try
{
document.WithSignature(SignatureBuilder.AcceptanceFor(signer.email));
}
catch (Exception ex)
{
errorMessage = ex.Message;
PortalUtils.WriteToLogfile(errorMessage, "");
PortalUtils.WriteToLogfile(ex.StackTrace, "");
throw;
}
}
///
/// Complete the back building process and send the package.
///
///
///
///
///
///
///
public String BuildAndSendPackage(List documents,
string exDate = "",
int firstReminder = 0,
int daysBetweenReminders = 0,
int numReminders = 0)
{
PackageId package = null;
try
{
//Haven't add the documents to the package yet.
foreach (DocumentBuilder docBuilder in documents)
{
pkg.WithDocument(docBuilder);
}
//Initialize the eSignClient
EslClient client = new EslClient(apiKey, url);
DocumentPackage docPackage = pkg.Build();
package = client.CreatePackage(docPackage);
Reply to: User getting error "No Role found for signer email [email address]"
Thursday, February 28, 2019 at 10:39amDuo, thank you very much for the explanation. We will definitely switch over to the "one-step" approach. Do we need to change anything else to accommodate this, or just call it in place of the other one?
Reply to: Error creating package
Thursday, March 7, 2019 at 03:06amThanks for your quick response. I discovered that the document is protected and thus cannot have a signature block placed on it. I will have the user fix and try again. Thanks!
Subscriptions
Topics | Replies | Freshness | Views | Users |
---|---|---|---|---|
User is receiving error:
02/25/2019 08:35:41.00: Could not upload documents to package. Exception: The remote server returned an error: (400) Bad Request.
|
3 | 5 years 1 month ago | 208 | |
Our client is receiving the above error message when trying to send a package. We are not creating and sending a CustomID, so not sure what the problem is.
|
5 | 5 years 1 month ago | 180 |
Subscriptions Release Notes
This user is not subscribed to any release notes.