Skip to content

response in #authenticate returns nil #17

Open

Description

@jamesfzhang

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?

Activity

  1. flushentitypacket commented on Feb 2, 2016

    @flushentitypacket
    Contributor

    Hey, @jamesfzhang. Fancy seeing you here.

    Ran into this as well. Blargh.

  2. jamesfzhang commented on Feb 2, 2016

    @jamesfzhang
    Author

    Haha Ron this is hilarious. Literally a year later and still no response. Faildot.

  3. flushentitypacket commented on Feb 2, 2016

    @flushentitypacket
    Contributor

    Added a PR, but I'm seeing >1-year old PRs with not so much as even a comment. Morale is low.

  4. jusroberts commented on Feb 3, 2016

    @jusroberts

    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.

  5. flushentitypacket commented on Feb 3, 2016

    @flushentitypacket
    Contributor

    @jusroberts Unfortunately, impossible to say without divulging private information.

  6. jusroberts commented on Feb 4, 2016

    @jusroberts

    Ah, so the issue is specific to certain users/accounts? How often are you getting a nil response back on login?

  7. flushentitypacket commented on Feb 4, 2016

    @flushentitypacket
    Contributor

    @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.

  8. jusroberts commented on Feb 4, 2016

    @jusroberts

    I agree. I'm working on getting permissions to merge the PR, but wanted to get it happening locally in the meantime.

  9. flushentitypacket commented on Feb 4, 2016

    @flushentitypacket
    Contributor

    👍

  10. jusroberts commented on Feb 25, 2016

    @jusroberts

    merged. I'll see what I need to do to get this out to rubygems.

  11. flushentitypacket commented on Feb 25, 2016

    @flushentitypacket
    Contributor

    Great!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions