getonbrd / pipedrive-connect

Ruby library for the Pipedrive API.
MIT License
19 stars 30 forks source link

404 when attempting to update lead #30

Closed bradherman closed 1 year ago

bradherman commented 1 year ago

Version: 1.2.11

Everything is working w/ my Pipedrive integration mostly except when trying to update a lead we get a 404 Not Found error.

I can find leads, persons, etc no problem. Updating a person works. When attempting any update to a lead though, the response.body in Pipedrive::Util is Not Found (404). Is anyone else running into this issue?

bradherman commented 1 year ago

Did a little digging... Turns out leads use the patch verb and not the put verb for updates... So we need to modify the request.rb file to whitelist the patch method and add in a way to override the method used on a resource level (ie: designate that lead should use patch versus put)... I can do this in the next day or two if nobody else jumps on it.

j4rs commented 1 year ago

Did a little digging... Turns out leads use the patch verb and not the put verb for updates... So we need to modify the request.rb file to whitelist the patch method and add in a way to override the method used on a resource level (ie: designate that lead should use patch versus put)... I can do this in the next day or two if nobody else jumps on it.

Sounds like an inconsistency of the Pipedrive API, can't think of why Lead would use a diff HTTP method.

Go for the solution to patch using patch 😄 and thanks for this Bradley.

j4rs commented 1 year ago

Fixed with #31