Skip to content

Commit

Permalink
Turn off JSON unknown properties fails - AWS sends extra props in Pro…
Browse files Browse the repository at this point in the history
…xyRequestContext but bean doesn't have it
  • Loading branch information
marcinczeczko committed Apr 18, 2019
1 parent 705c943 commit 6f83295
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.amazon.lambda.runtime;

import com.fasterxml.jackson.databind.DeserializationFeature;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.net.URL;
Expand All @@ -23,7 +24,7 @@ public void start(Class<? extends RequestHandler> handlerClass,
BeanContainer beanContainer) {
RequestHandler handler = beanContainer.instance(handlerClass);

final ObjectMapper mapper = new ObjectMapper();
final ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
AtomicBoolean running = new AtomicBoolean(true);
ObjectReader objectReader = mapper.readerFor(handlerType.getValue());
context.addShutdownTask(new Runnable() {
Expand Down

0 comments on commit 6f83295

Please sign in to comment.