ERROR: URI Too Long

Issue

The URI Too Long error occurs when a user tries to sync and runs into a Salesforce platform restriction.

Example

[20-05-18 18:47:28][WARN ][539128692048] - Unexpected HTTP response code: 414

[20-05-18 18:47:28][ERROR][539128692048] - Error response: <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

[20-05-18 18:47:28][INFO ][539128692048] - QueryWave received: Account wave 0

[20-05-18 18:47:28][INFO ][539128692048] - **** Account -- waveMaxWaves 25 waveNumber 0 lastWave false

Solution

When a client application queries the Salesforce platform, it cannot do a simple wild character query like select * from Account. It has to specify all fields by API name. Pulsar has to send a query for all fields found in the schema for this particular user profile.

Our customers who have run into this problem often were testing with an admin user account where it has permission to view all fields on that object. If you switch to a test user account representative of a real user, you may not have this problem. If you continue to have a problem, you will want to limit how many fields are visible to the regular user.

It is hard to find the exact limit on the URI length from Salesforce documentation but you can reference this Stack Exchange post where the developer says the following: "Through trial and error, I was able to determine that Salesforce's limit on the URI length is 16,088 characters."

https://salesforce.stackexchange.com/questions/195449/what-is-the-longest-uri-that-salesforce-will-accept-through-the-rest-api

Â