Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

REST request malformed when query string param is blank

SA-76949

Summary



When the Connect-REST rule (JSON) has only a Single query string parameter and if the value of the parameter is blank, then the REST Request is malformed. This works if a dummy query string parameter is added to the Connect-REST rule.

For example:

The query string for the request is as follows:


Single parameter:

Expected:

http://xxxxdev/prweb/PRRestService/DocCatalogSvcs/SearchDocuments/Search?docNameOrNumber=

Actual:

http://xxxxdev/prweb/PRRestService/DocCatalogSvcs/SearchDocuments/Search?docNameOrNumber

Two parameters:

Expected:

http://xxxxdev/prweb/PRRestService/DocCatalogSvcs/SearchDocuments/Search?docNameOrNumber=&docType=
 

Actual:


http://xxxxdev/prweb/PRRestService/DocCatalogSvcs/SearchDocuments/Search?docNameOrNumber=&docType=


Error Messages



HTTP Status: 400 Bad Request
Message: The request could not be understood by the server due to malformed syntax


Steps to Reproduce

  1. Use a REST Service that accepts only a Single query string parameter.
  2. Invoke the Connect-REST rule without passing a value for the query string parameter. This results in an error due to a malformed request.

    Resource path generated: 
    http://xxxxdev/prweb/PRRestService/DocCatalogSvcs/SearchDocuments/Search?docNameOrNumber


Root Cause



A defect in Pegasystems’ code  or rules.


Resolution



Perform the following local-change:

Set the pySkipBlankQueryParts parameter in the Request data transform.

Published May 12, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us