diff --git a/pom.xml b/pom.xml index 7c3909e..08d990f 100644 --- a/pom.xml +++ b/pom.xml @@ -131,17 +131,17 @@ com.fasterxml.jackson.core jackson-databind - 2.9.3 + 2.13.4.1 org.apache.commons commons-collections4 - 4.1 + 4.3 commons-io commons-io - 2.6 + 2.7 javax.servlet @@ -151,7 +151,7 @@ junit junit - 4.12 + 4.13.1 test diff --git a/src/main/java/io/prismic/core/HttpClient.java b/src/main/java/io/prismic/core/HttpClient.java index 4364ee5..d1e33a4 100644 --- a/src/main/java/io/prismic/core/HttpClient.java +++ b/src/main/java/io/prismic/core/HttpClient.java @@ -59,7 +59,7 @@ public static JsonNode fetch(String url, Logger logger, Cache cache, Proxy proxy String errorText = "Unknown error"; JsonNode errorJson = new ObjectMapper().readTree(httpConnection.getErrorStream()); if (errorJson != null) { - errorText = errorJson.get("error").asText(); + errorText = errorJson.get("message").asText(); } switch (httpConnection.getResponseCode()) { case 401: diff --git a/src/test/java/io/prismic/AppTest.java b/src/test/java/io/prismic/AppTest.java index 3221300..7ac4dbf 100644 --- a/src/test/java/io/prismic/AppTest.java +++ b/src/test/java/io/prismic/AppTest.java @@ -164,8 +164,8 @@ public String resolve(Fragment.DocumentLink link) { }); String docchapter_expected = "Using with other projects\n" +"As advertised, meta-micro knows how to stay out of the way of the rest of your application. Here are some cases of how to use it with some of the most used open-source projects in JavaScript.\n" - +"500.0\n" - +"with-jquerywith-bootstrap"; + +"with-jquerywith-bootstrap\n" + +"500.0"; Assert.assertEquals( "HTML serialization of docchapter \"Using meta-micro\"", docchapter_expected, diff --git a/src/test/java/io/prismic/DocumentTest.java b/src/test/java/io/prismic/DocumentTest.java index 60c0944..d152d66 100644 --- a/src/test/java/io/prismic/DocumentTest.java +++ b/src/test/java/io/prismic/DocumentTest.java @@ -170,7 +170,7 @@ public void image() { .query(Predicates.at("document.id", "Uyr9sgEAAGVHNoFZ")) .submit().getResults().get(0); Fragment.Image.View img = doc.getImage("article.illustration", "icon"); - String url = "https://prismic-io.s3.amazonaws.com/test-public/9f5f4e8a5d95c7259108e9cfdde953b5e60dcbb6.jpg"; + String url = "https://images.prismic.io/test-public/9f5f4e8a5d95c7259108e9cfdde953b5e60dcbb6.jpg?auto=compress,format"; Assert.assertEquals("", img.asHtml(linkResolver)); }
As advertised, meta-micro knows how to stay out of the way of the rest of your application. Here are some cases of how to use it with some of the most used open-source projects in JavaScript.