heroku/databasedotcom — pull request #70 by campbell (2012-03-20 14:18:13+00:00)
Title: Implemented check for path > 8192 characters (HTTP Salesforce REST limit)

Since SOQL does not have a 'SELECT *' option, you must specify every field for the SELECT statement when performing a query. Very large SObjects may have a huge number of fields, so including each one in the query string can produce a string that exceeds the 8192 character limit that Salesforce enforces for HTTP requests.

This patch checks the length of the request URL and raises a Databasedotcom::MaxPathLengthCheck error if it exceeds 8192. This will be more informative to developers and users compared to a generic 500 error.

I will soon submit another patch that will blacklist specified Salesforce fields so you can work around this 8192 character limit.