diff --git a/appengine/mailjet/pom.xml b/appengine/mailjet/pom.xml
index 37ddcf5ddc7..00de4a5ebb7 100644
--- a/appengine/mailjet/pom.xml
+++ b/appengine/mailjet/pom.xml
@@ -25,13 +25,14 @@
1.0.0
../..
+
+ 4.0.5
+
com.mailjet
mailjet-client
- 4.0.4
- system
- ${project.basedir}/src/main/webapp/WEB-INF/lib/client-3.1.1-jar-with-dependencies.jar
+ ${mailjet.version}
javax.servlet
diff --git a/appengine/mailjet/src/main/java/com/example/appengine/mailjet/MailjetServlet.java b/appengine/mailjet/src/main/java/com/example/appengine/mailjet/MailjetServlet.java
index a63e44073ab..164ba4d10bc 100644
--- a/appengine/mailjet/src/main/java/com/example/appengine/mailjet/MailjetServlet.java
+++ b/appengine/mailjet/src/main/java/com/example/appengine/mailjet/MailjetServlet.java
@@ -20,6 +20,7 @@
import com.mailjet.client.MailjetRequest;
import com.mailjet.client.MailjetResponse;
import com.mailjet.client.errors.MailjetException;
+import com.mailjet.client.errors.MailjetSocketTimeoutException;
import com.mailjet.client.resource.Email;
// [END mailjet_imports]
@@ -64,6 +65,8 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx
resp.getWriter().print(response.getData());
} catch (MailjetException e) {
throw new ServletException("Mailjet Exception", e);
+ } catch (MailjetSocketTimeoutException e) {
+ throw new ServletException("Mailjet socket timed out", e);
}
}
}
diff --git a/compute/mailjet/pom.xml b/compute/mailjet/pom.xml
index b975cc89644..a5e4d9c6bcf 100644
--- a/compute/mailjet/pom.xml
+++ b/compute/mailjet/pom.xml
@@ -26,6 +26,10 @@
../..
+
+ 4.0.5
+
+
junit
@@ -50,7 +54,7 @@
com.mailjet
mailjet-client
- 4.0.5
+ ${mailjet.version}
diff --git a/flexible/mailjet/pom.xml b/flexible/mailjet/pom.xml
index f167019ad3b..ae93a07e1a4 100644
--- a/flexible/mailjet/pom.xml
+++ b/flexible/mailjet/pom.xml
@@ -33,6 +33,7 @@
3.0.0
2.0.9.121.v20160815
9.3.7.v20160115
+ 4.0.5
@@ -47,7 +48,7 @@
com.mailjet
mailjet-client
- 4.0.1
+ ${mailjet-version}
diff --git a/flexible/mailjet/src/main/java/com/example/managedvms/mailjet/MailjetServlet.java b/flexible/mailjet/src/main/java/com/example/managedvms/mailjet/MailjetServlet.java
index 33411dc2717..f8a921c9b50 100644
--- a/flexible/mailjet/src/main/java/com/example/managedvms/mailjet/MailjetServlet.java
+++ b/flexible/mailjet/src/main/java/com/example/managedvms/mailjet/MailjetServlet.java
@@ -21,6 +21,7 @@
import com.mailjet.client.MailjetRequest;
import com.mailjet.client.MailjetResponse;
import com.mailjet.client.errors.MailjetException;
+import com.mailjet.client.errors.MailjetSocketTimeoutException;
import com.mailjet.client.resource.Email;
// [END mailjet_imports]
@@ -67,6 +68,8 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx
resp.getWriter().print(response.getData());
} catch (MailjetException e) {
throw new ServletException("Mailjet Exception", e);
+ } catch (MailjetSocketTimeoutException e) {
+ throw new ServletException("Mailjet socket timed out", e);
}
}
}