Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.3</version>
<version>2.13.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
<version>4.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>2.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand All @@ -151,7 +151,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<!-- to simulate a proxy -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/prismic/core/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/prismic/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public String resolve(Fragment.DocumentLink link) {
});
String docchapter_expected = "<section data-field=\"docchapter.title\"><h1>Using with other projects</h1></section>\n"
+"<section data-field=\"docchapter.intro\"><p>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.</p></section>\n"
+"<section data-field=\"docchapter.priority\"><span class=\"number\">500.0</span></section>\n"
+"<section data-field=\"docchapter.docs\"><section data-field=\"linktodoc\"><a href=\"/UrDofwEAALAdpbNH/with-jquery\">with-jquery</a></section><section data-field=\"linktodoc\"><a href=\"/UrDp8AEAAPUdpbNL/with-bootstrap\">with-bootstrap</a></section></section>";
+"<section data-field=\"docchapter.docs\"><section data-field=\"linktodoc\"><a href=\"/UrDofwEAALAdpbNH/with-jquery\">with-jquery</a></section><section data-field=\"linktodoc\"><a href=\"/UrDp8AEAAPUdpbNL/with-bootstrap\">with-bootstrap</a></section></section>\n"
+"<section data-field=\"docchapter.priority\"><span class=\"number\">500.0</span></section>";
Assert.assertEquals(
"HTML serialization of docchapter \"Using meta-micro\"",
docchapter_expected,
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/prismic/DocumentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 alt=\"some alt text\" src=\"" + url + "\" width=\"100\" height=\"100\" />", img.asHtml(linkResolver));
}

Expand Down