Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

AddCustomField throws an error when required and editor parameters are not explicitly passed. #68

Open
Framinus opened this issue Feb 19, 2019 · 19 comments
Labels
legacy Related to legacy, non-OpenAPI SDK

Comments

@Framinus
Copy link

The AddCustomField is supposed to have two mandatory parameters - name and value - and two optional parameters, "editor" and "required".

When only the "name" and "value" parameters are passed into AddCustomField, the following error gets thrown:

Unhandled Exception: HelloSign.BadRequestException: custom_fields with a required parameter must specify an editor parameter.

I think this may have to do with how the values of the required and editor parameters are being set by the SDK in hellosign-dotnet-sdk/src/HelloSign/Models/TemplateSignatureRequest.cs Line 62:

public void AddCustomField(string key, string value, string editor = null, bool required = false)

I am wondering if the error is getting thrown because the required parameter is being submitted, even if the value of it is submitted as false?

@djschwarz
Copy link

I am getting the same behavior.

@djschwarz
Copy link

I added "Me" as a signer and I no longer get the error message.

durgeshpatel-hs added a commit that referenced this issue May 2, 2019
Fixed issue #68
Corrected README
BHSPitMonkey added a commit that referenced this issue May 6, 2019
Fixes issue #68 and bumps version to 1.2.0
@meljason
Copy link

meljason commented Mar 3, 2021

I added "Me" as a signer and I no longer get the error message.

@djschwarz Hello, could you elaborate more on that? How do you add "me" as a signer?

@djschwarz
Copy link

djschwarz commented Mar 5, 2021 via email

@elminson
Copy link

elminson commented Sep 22, 2021

request.addSigner("email@gmail.com", "client_name", "Me"); // You are missing the last param on addSigner
request.AddCustomField('b0d6da_11', doc.First, "Me");

you need to add the last param as signer and then use it in each AddCustomField

cc: @djschwarz

@raedbadran
Copy link

raedbadran commented Sep 22, 2021

I just started getting this error out of the blue today. Did HelloSign push changes today? Any help or insight is appreciated.

@najens
Copy link

najens commented Sep 22, 2021

Just started getting this error today as well with a php-sdk at 3:21pm MDT, so there was likely a HelloSign API release today that started causing this to happen.

@Framinus
Copy link
Author

@raedbadran and @najens - I no longer work at HelloSign. I would recommend opening a ticket with the API Support team. But yes, it looks like there was a release today: https://status.hellosign.com/#past-incidents

@raedbadran
Copy link

@najens and @Framinus Thank you very much. Was going a bit crazy over here.

Just opened a ticket. Will update here once I hear back from them. Have a wonderful night.

@paaacman
Copy link

paaacman commented Sep 22, 2021

Has @najens said, we have the same with hellosign-php-sdk.
Apprently HelloSign API does not accept anymore required and editor as null in custom_fields.

It's working if you remove those null fields.

See hellosign/hellosign-php-sdk#119

@adamskinner
Copy link

Im getting the same error. Thanks paccman

@justinstanley
Copy link

Same error here as well.

@raedbadran
Copy link

raedbadran commented Sep 22, 2021

fixed by removing the nulls. See @paaacman post. Thank you:)

@justinhorner
Copy link

fixed by removing the nulls. See @paaacman post. Thank you:)

How are you removing the nulls? Are you sending the data as JSON or as the c# TemplateSignatureRequest class?

@justinstanley
Copy link

Has @najens said, we have the same with hellosign-php-sdk.
Apprently HelloSign API does not accept anymore required and editor as null in custom_fields.

It's working if you remove those null fields.

See hellosign/hellosign-php-sdk#119

I only have one signer and they should not be able to edit the custom field, so that route doesn't work for me. I also tried to set "required: false" below but I still receive the same error.

var client = new Client(_apiKey); var request = new TemplateSignatureRequest(); request.AddTemplate(templateId); request.AllowDecline = false; request.AddSigner("client", email, name, pin: pin); request.AddCustomField("name", name, required:false); request.AddCustomField("title", title, required: false);

HelloSign.BadRequestException: 'custom_fields with a required parameter must specify an editor parameter.'

@paaacman
Copy link

In the JSON custom_fields, with the SDK, we have "required":null in fields.
I remove null fields in the JSON content.

@justinstanley
Copy link

justinstanley commented Sep 22, 2021

Update from API support - "Thank you for reaching out and sorry to hear about the trouble. We've identified an issue where our release on 9/21 introduced a new error for custom_fields. We are working on a fix. I will continue to keep you updated."

https://status.hellosign.com/incidents/v511033g104w

@aperlstein
Copy link

Should we just add this to editor and required on the CustomField model?

[JsonProperty("editor", NullValueHandling=NullValueHandling.Ignore)]

@BHSPitMonkey
Copy link
Contributor

This was indeed caused by server-side validation changes in yesterday's release; A fix was just deployed at 11:00AM Pacific Time (18:00 UTC). Sincere apologies for the inconvenience this bug has caused, and sincere thanks to everyone who provided reports here and via email (all of which were helpful in finding a resolution).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy Related to legacy, non-OpenAPI SDK
Projects
None yet
Development

No branches or pull requests