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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.prismic</groupId>
<artifactId>java-kit</artifactId>
<packaging>jar</packaging>
<version>2.0.0</version>
<version>2.0.1-SNAPSHOT</version>
<name>java-kit</name>
<description>The developer kit to access Prismic.io repositories using the Java language.</description>
<url>http://maven.apache.org</url>
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 @@ -58,7 +58,7 @@ public static JsonNode fetch(String url, Logger logger, Cache cache, Proxy proxy
String body;
String errorText = "Unknown error";
JsonNode errorJson = new ObjectMapper().readTree(httpConnection.getErrorStream());
if (errorJson != null) {
if (errorJson != null && errorJson.get("error") != null) {
errorText = errorJson.get("error").asText();
}
switch (httpConnection.getResponseCode()) {
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://test-public.cdn.prismic.io/test-public/9f5f4e8a5d95c7259108e9cfdde953b5e60dcbb6.jpg";
Assert.assertEquals("<img alt=\"some alt text\" src=\"" + url + "\" width=\"100\" height=\"100\" />", img.asHtml(linkResolver));
}

Expand Down