Created
September 25, 2012 08:11
-
-
Save ricburton/3780573 to your computer and use it in GitHub Desktop.
Pipedrive API error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.create_deal(title, value) | |
post("/deals/title=#{title}&value=#{value}") | |
end | |
#threw this error: // #<HTTParty::Response:0x10f4cbf98 parsed_response={"success"=>false, "error"=>"Internal Server Error occurred. Pipedrive staff was notified about this."}, @response=#<Net::HTTPInternalServerError 500 Internal Server Error readbody=true>, @headers={"connection"=>["close"], "server"=>["nginx/0.7.67"], "access-control-allow-origin"=>["*"], "content-type"=>["application/json, charset=UTF-8"], "content-length"=>["100"], "x-powered-by"=>["PHP/5.3.3-7+squeeze8"], "date"=>["Tue, 25 Sep 2012 08:09:34 GMT"]}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey. The issue here is that you should not attach variables to URL like that. Instead, when doing a POST or PUT request, the variables (key=value&key=value) must be in the request body instead. We will have the error message fixed shortly - it should actually produce response error 400, not 500. Sorry about that.