Tejaswi

Code 400 Validation error

0 votes
Hi I created two procedures in the same package which includes REST API. One procedure includes rest api to attach a report say ABC and in 2nd procedure another report XYZ is attached to esign portal. My first procedure is working fine but in second procedure the following error shows: {"technical":"","messageKey":"http.status.400","packageId":null,"messageLanguage":null,"parameters":{},"entity":null,"message":"Validation Error","code":400,"name":"Validation Error"} When I try to run the 2nd procedure as a script, it works perfectly. Also, the two procedures cannot run at the same time based on the requirement. The only difference in both procedures is the pdf attachment and json content.

Reply to: Code 400 Validation error

0 votes
Hi Tejaswi, 400 normally refers to the incorrect request structure, so can you print out and provide with your whole request, in the second procedure? Or you can share the procedure code, the JSON content and the document to [email protected], so that I can try to reproduce the same error. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Code 400 Validation error

0 votes
below is the whole response for the second procedure: Response> Status Code: 400 Response> Reason Phrase: Bad Request Response> HTTP Version: HTTP/1.1 Response> Server: nginx Response> Date: Mon, 25 Nov 2019 09:54:55 GMT Response> Content-Type: application/json Response> Transfer-Encoding: chunked Response> Connection: close Response> X-Powered-By: Undertow Response> Allow: GET, POST, HEAD, PUT, PATCH, DELETE Response body> {"code":400,"packageId":null,"messageKey":"http.status.400","technical":"","messageLanguage":null,"parameters":{},"entity":null,"message":"Validation Error","name":"Validation Error"} Unsuccessfull

Reply to: Code 400 Validation error

0 votes
Hi Tejaswi, Did you mean that: the same code for the second procedure, if you run individually as a declare script, it works perfectly adding a document to an existing package; but it yielded the 400 error when running under the certain sequence/logic of your procedures? If that's the case, what if you changed another report and JSON payload for the second procedure, does it work in this workflow or you hit the same error? BTW, I meant to provide with the request body, where I want to check the structure of your request to see whether there's any missing blank lines or spaces. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Code 400 Validation error

0 votes
Hi Duo, I found a way to attach both the reports using rest api. What I did is, I developed a single procedure in which ABC report will get attached (along with its json) based on a condition. And another report XYZ will get attached along with its json based on another condition. So, only one rest api call is used. As I mentioned earlier, the two reports cannot run at the same time.

Reply to: Code 400 Validation error

0 votes

Hi Duo,

Getting the below error while executing integration program:

{"code":400,"packageId":null,"messageKey":"http.status.400","technical":"","messageLanguage":null,"parameters":{},"entity":null,"message":"Validation Error","name":"Validation Error"}

This error is occurring for some records only. I have also checked the data passed into JSON. Everything seems to be okay.

Unable to find the cause. Kindly help.

 


Reply to: Code 400 Validation error

0 votes

Hi Tejaswi,

 

Did it consistently fail to create a package, for those records + JSON combinations? Could it because the passed in data somehow broke the JSON format, like include unexpected double quotation marks?

Could you remove sensitive information and send your payload and the PDF to [email protected] so that I can have a closer look at them? (because I saw you were using text anchors to put fields, so it could be necessary to check the PDF as well) Or if you preferred to do it at your end, you could easily test your PDF and payload using API Clients like Postman, a desired result is that we can reproduce the 400 error.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off