Skip to content

Authentication errors are being thrown as Server errors #38

Description

@jmnsf

When Sendgrid returns 403 bad user/pass you'd expect a SendgridTookit::AuthenticationFailed error but get a SendgirdToolkit::SendgridServerError instead:

pry(SendGridExporter)> e.class
=> SendgridToolkit::SendgridServerError
pry(SendGridExporter)> e.message
=> "The sengrid server returned an error. #<HTTParty::Response:0x1064a2638 parsed_response={\"error\"=>\"Bad username / password\"}, @response=#<Net::HTTPForbidden 403 Forbidden readbody=true>, @headers={\"server\"=>[\"nginx/1.4.4\"], \"date\"=>[\"Tue, 09 Sep 2014 09:01:26 GMT\"], \"content-type\"=>[\"text/html\"], \"transfer-encoding\"=>[\"chunked\"], \"connection\"=>[\"close\"]}>"

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions