Skip to content

Instantly share code, notes, and snippets.

@ricburton
Created September 25, 2012 08:11
Show Gist options
  • Save ricburton/3780573 to your computer and use it in GitHub Desktop.
Save ricburton/3780573 to your computer and use it in GitHub Desktop.
Pipedrive API error
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"]}>
@martintajur
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment