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
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?
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 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.
Activity
flushentitypacket commentedon Feb 2, 2016
Hey, @jamesfzhang. Fancy seeing you here.
Ran into this as well. Blargh.
jamesfzhang commentedon Feb 2, 2016
Haha Ron this is hilarious. Literally a year later and still no response. Faildot.
flushentitypacket commentedon Feb 2, 2016
Added a PR, but I'm seeing >1-year old PRs with not so much as even a comment. Morale is low.
jusroberts commentedon Feb 3, 2016
Do you have a way of reproducing this issue? I've tried running the
client.authenticatewith varying bad parameters, but have only ever gotten aPardot::ResponseError: Login failederror.flushentitypacket commentedon Feb 3, 2016
@jusroberts Unfortunately, impossible to say without divulging private information.
jusroberts commentedon Feb 4, 2016
Ah, so the issue is specific to certain users/accounts? How often are you getting a nil response back on login?
flushentitypacket commentedon Feb 4, 2016
@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.
jusroberts commentedon Feb 4, 2016
I agree. I'm working on getting permissions to merge the PR, but wanted to get it happening locally in the meantime.
flushentitypacket commentedon Feb 4, 2016
👍
jusroberts commentedon Feb 25, 2016
merged. I'll see what I need to do to get this out to rubygems.
flushentitypacket commentedon Feb 25, 2016
Great!