response in #authenticate returns nil
jamesfzhang opened this issue · comments
I'm getting "NoMethodError: undefined method [] for nil:NilClass" when running client.authenticate
, specifically, resp
is nil
. I'm a third party connecting to customers' Pardot accounts and I'm assuming some combination of email
, password
, and user_key
is incorrect. Shouldn't this raise an error instead?
Hey, @jamesfzhang. Fancy seeing you here.
Ran into this as well. Blargh.
Haha Ron this is hilarious. Literally a year later and still no response. Faildot.
Added a PR, but I'm seeing >1-year old PRs with not so much as even a comment. Morale is low.
Do you have a way of reproducing this issue? I've tried running the client.authenticate
with varying bad parameters, but have only ever gotten a Pardot::ResponseError: Login failed
error.
@jusroberts Unfortunately, impossible to say without divulging private information.
Ah, so the issue is specific to certain users/accounts? How often are you getting a nil response back on login?
@jusroberts Seems to be that way--just looking at the accounts, I don't see anything special, which makes this tough tell you how to to reproduce. This happens consistently for affected accounts--shot in the dark, but maybe this happens for deactivated/deleted accounts or something like that?
Regardless, if the API is able to return a nil response, the code using the response should be equipped to handle it.
I agree. I'm working on getting permissions to merge the PR, but wanted to get it happening locally in the meantime.
👍
merged. I'll see what I need to do to get this out to rubygems.
Great!