Page 1 of 1

Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 4:06 am
by Carl Porch

I've imported a query service from the Account object of Salesforce.

When I test the query service -- I get records returned with no problem.

When I attempt to run the exact same query from the Form (using an appery.io proxy), I get a Bad Request error.

The service does returns a Failure. Is it possible your Proxy isn't working?

I was having the same problem with a previous project, but figured I'd start over and create a new project from a good backup. That didn't work either! Did something change on your system?

Thanks,
Carl


Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 4:26 am
by Igor

Hello,

Appery.io was upgraded in the mid of January : http://docs.appery.io/roadmap/
Please take a look proxy configuration doc: http://docs.appery.io/documentation/s...


Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 4:54 am
by Carl Porch

How do you know that your proxies are working correctly?

Consider the following:

  1. I use exactly the same query in the form as for the query service. No javascript modifies it.

  2. When I ECHO the response -- the form displays the records correctly.

  3. When I turn off the ECHO and attempt to query Salesforce -- I get a "Bad Request" error.

  4. The query works perfectly if I'm simply testing the service.

    I think it's pretty clear that the appery.io proxy: 48cde557-ff1b-48ed-892a-8e6198d08f8b --Does NOT work.

    Test it and tell me otherwise.

    Thanks,
    Carl


Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 4:56 am
by Igor

Please share app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us app name.


Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 8:09 pm
by Carl Porch

FindNearbyAgenoes and app has been shared.


Bad Request error when running query from Form

Posted: Sat Feb 01, 2014 8:12 pm
by Igor

We'll test but it can take some time.


Bad Request error when running query from Form

Posted: Mon Feb 03, 2014 6:25 pm
by Maryna Brodina

Hello! Sorry for a late reply. Get parameters are encoded differently when are sent through parameters or set in URL. In URL add pre?q={q}/pre in the end so that URL loklike this pre{salesforce_instance_url}/services/data/{salesforce_api_version}/query?q={q}/pre


Bad Request error when running query from Form

Posted: Mon Feb 03, 2014 6:33 pm
by Carl Porch

Thank you, I wouldn't have figured that out.


Bad Request error when running query from Form

Posted: Mon Feb 03, 2014 6:38 pm
by Carl Porch

Last question -- what is the difference between versioning and creating a backup? When I create a new version, it gives me the option of "Restore" for prior version; seems very much like restoring from a backup.

Certainly simpler to create a new version -- if the end result is identical.


Bad Request error when running query from Form

Posted: Mon Feb 03, 2014 8:03 pm
by Maryna Brodina

You can keep project backup locally saved on your PC even when you don't have Appery.io subscription and restore it when it's needed. But you're right that it's simpler to create a new version - you don't need to restore previous app version from backup, link it to DB from scratch, etc. Also backup doesn't store Android and iOS certificates.