Skip to content

Commit

Permalink
Merge pull request #168 from BernardoGiordano/main
Browse files Browse the repository at this point in the history
Don't throw exception on unmapped property deserialization
  • Loading branch information
Bindambc authored May 5, 2024
2 parents d8665f2 + 484e2bf commit 073ba19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public class WhatsappApiServiceGenerator {

static OkHttpClient sharedClient;
private static final Converter.Factory converterFactory = JacksonConverterFactory.create(
new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false)
.configure(DeserializationFeature.FAIL_ON_UNRESOLVED_OBJECT_IDS, false)
.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false)
);

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ public String getMessage() {
return super.getMessage();
}

public WhatsappApiError getError() {
return whatsappApiError;
}

}

0 comments on commit 073ba19

Please sign in to comment.