Carl Porch
Posts: 0
Joined: Tue Jan 21, 2014 4:42 pm

Bad Request error when running query from Form

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Bad Request error when running query from Form

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...

Carl Porch
Posts: 0
Joined: Tue Jan 21, 2014 4:42 pm

Bad Request error when running query from Form

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Bad Request error when running query from Form

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

Carl Porch
Posts: 0
Joined: Tue Jan 21, 2014 4:42 pm

Bad Request error when running query from Form

FindNearbyAgenoes and app has been shared.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Bad Request error when running query from Form

We'll test but it can take some time.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Bad Request error when running query from Form

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

Carl Porch
Posts: 0
Joined: Tue Jan 21, 2014 4:42 pm

Bad Request error when running query from Form

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

Carl Porch
Posts: 0
Joined: Tue Jan 21, 2014 4:42 pm

Bad Request error when running query from Form

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Bad Request error when running query from Form

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.

Return to “Issues”