Skip to content

Commit cb63d82

Browse files
author
Yamil Asusta
committed
Merge pull request #52 from chrisdinn/issue_51
Throw SendGridException on IOException communicating with SendGrid API
2 parents d73dd84 + 807db57 commit cb63d82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/sendgrid/SendGrid.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public SendGrid.Response send(Email email) throws SendGridException {
148148
HttpResponse res = this.client.execute(httppost);
149149
return new SendGrid.Response(res.getStatusLine().getStatusCode(), EntityUtils.toString(res.getEntity()));
150150
} catch (IOException e) {
151-
return new SendGrid.Response(500, "Problem connecting to SendGrid");
151+
throw new SendGridException(e);
152152
}
153153

154154
}

0 commit comments

Comments
 (0)