Skip to content

Commit 807db57

Browse files
author
Chris Dinn
committed
Throw SendGridException on IOException while communicating with SendGrid API.
Fixes #51.
1 parent d73dd84 commit 807db57

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)