Skip to content

Does not correctly handle verification_failed errors of API #3

@NikolaiGulatz

Description

@NikolaiGulatz

The following response by the hunterio API is not properly handled in the gem:

{
  "errors": [
    {
      "id": "verification_failed",
      "code": 222,
      "details": "We failed to verify the email address for reasons outside of our control. We advise you to retry later."
    }
  ]
}

and leads to the following error since data is not present:

NoMethodError: undefined method `merge!' for nil:NilClass
  from hunter/email_verifier.rb:28:in `call_api'
  from hunter/email_verifier.rb:15:in `perform'
  from hunter/api.rb:31:in `email_verifier'

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