You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I did find that adding the first slash to the method '/services/data/v20.0/sobjects/Lead' changes the error from a 404 to a 400 Bad Request, I never did figure out a way to make the post work. Later, having switched to a few lines of CURL, I determined that I was missing a required (non-nillable) field, "Company". So there was really never any chance I was going to get this bundle's post call to work.
The larger issue, also demonstrated by the Call function, is throwing a Bad Request exception rather than an informative error message from Salesforce. Like when a query contains an invalid field, or a create is missing a required field. I rather assume this more an issue with the implementation of Guzzle, because a basic curl_exec does return this data.
So for now, I'm keeping your Soap-Client bundle for authentication, but have removed this Rest-API and the Guzzle bundles in favor of simply making my own Curl call/posts/error-handling.
Hi David -
I'm having a bit of trouble with the post method of the rest client, implemented in a Symfony2.2 project.
By way of example, this throws a 404 error. The $postData is an array keyed by field_name.
Client error response
[status code] 404
[reason phrase] Not Found
[url] https://na15.salesforce.com/services/apexrest/services/data/v20.0/sobjects/Lead
This, on the other hand, works perfectly
What am I failing to grasp about proper usage of the post method, or is it not complete?
Thanks!
Bart
The text was updated successfully, but these errors were encountered: