Skip to content

Commit

Permalink
Log JSON string that caused parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Apr 2, 2024
1 parent 207411d commit 8e6a3b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/odh/test/platform/KFPv1Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package io.odh.test.platform;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -33,6 +34,7 @@
public class KFPv1Client {
private final ObjectMapper objectMapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.enable(JsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION)
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
private final HttpClient httpClient = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_2)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/odh/test/platform/KFPv2Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package io.odh.test.platform;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -35,6 +36,7 @@
public class KFPv2Client {
private final ObjectMapper objectMapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.enable(JsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION)
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
private final HttpClient httpClient = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_2)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/odh/test/platform/RayClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package io.odh.test.platform;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -28,6 +29,7 @@
public class RayClient {
private final ObjectMapper objectMapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.enable(JsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION)
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
private final HttpClient httpClient = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_2)
Expand Down

0 comments on commit 8e6a3b0

Please sign in to comment.