diff --git a/src/main/java/org/prebid/server/json/ObjectMapperProvider.java b/src/main/java/org/prebid/server/json/ObjectMapperProvider.java index 96189d6706f..fc1bcea0611 100644 --- a/src/main/java/org/prebid/server/json/ObjectMapperProvider.java +++ b/src/main/java/org/prebid/server/json/ObjectMapperProvider.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.StreamReadFeature; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; @@ -17,7 +18,9 @@ public final class ObjectMapperProvider { MAPPER = JsonMapper.builder().configure(MapperFeature.DEFAULT_VIEW_INCLUSION, false) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true) - .enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN).build() + .enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN) + .enable(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION) + .build() .setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE) .setSerializationInclusion(JsonInclude.Include.NON_NULL) .registerModule(new BlackbirdModule()) diff --git a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java index f96251f16be..58a9386de55 100644 --- a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java +++ b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java @@ -2652,8 +2652,7 @@ public void shouldPopulateBidResponseExtension() { ExtBidderError.of(3, "Failed to decode: Cannot deserialize value" + " of type `com.iab.openrtb.response.Response` from Array value " + "(token `JsonToken.START_ARRAY`)\n" - + " at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION`" - + " disabled); line: 1, column: 1]"))), + + " at [Source: (String)\"[]\"; line: 1, column: 1]"))), entry("cache", singletonList(ExtBidderError.of(999, "cacheError")))); assertThat(responseExt.getResponsetimemillis()).hasSize(2) @@ -3151,7 +3150,7 @@ public void shouldThrowExceptionWhenNativeRequestIsInvalid() throws JsonProcessi .extracting(error -> error.get(bidder1)) .extracting(extBidderErrors -> extBidderErrors.get(0)) .isEqualTo(ExtBidderError.of(3, "No content to map due to end-of-input\n" - + " at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]")); + + " at [Source: (String)\"\"; line: 1, column: 0]")); } @Test diff --git a/src/test/java/org/prebid/server/bidder/adtelligent/AdtelligentBidderTest.java b/src/test/java/org/prebid/server/bidder/adtelligent/AdtelligentBidderTest.java index 2628aabb755..73622242460 100644 --- a/src/test/java/org/prebid/server/bidder/adtelligent/AdtelligentBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/adtelligent/AdtelligentBidderTest.java @@ -402,11 +402,8 @@ public void makeBidsShouldReturnEmptyBidderWithErrorWhenResponseCantBeParsed() { assertThat(result.getErrors()).hasSize(1) .containsExactly(BidderError.badServerResponse( "Failed to decode: Unexpected end-of-input: expected close marker" - + " for Object (start marker at [Source: REDACTED " - + "(`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); " - + "line: 1, column: 1])\n" - + " at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled);" - + " line: 1, column: 2]")); + + " for Object (start marker at [Source: (String)\"{\"; line: 1, column: 1])\n" + + " at [Source: (String)\"{\"; line: 1, column: 2]")); } private static BidderCall givenHttpCall(String body) {