mailgun / mailgun-java

Java SDK for integrating with Mailgun
Apache License 2.0
16 stars 11 forks source link

Could not parse "attachments" field in EventMessage when getting events #10

Closed uytruong closed 2 years ago

uytruong commented 2 years ago

I got the exception: feign.FeignException: Cannot deserialize value of typejava.util.ArrayListfrom Object value (tokenJsonToken.START_OBJECT) at [Source: (BufferedReader); line: 525, column: 11] (through reference chain: com.mailgun.model.events.EventsResponse$EventsResponseBuilder["items"]->java.util.ArrayList[12]->com.mailgun.model.events.EventItem$EventItemBuilder["message"]->com.mailgun.model.events.EventMessage$EventMessageBuilder["attachments"]->java.util.ArrayList[0]) when I called events API and retrieve the events that have attachments

As I checked, the type of "attachments" field is List but the API returns List instead: Screen Shot 2022-09-23 at 6 42 10 PM

Thank you a lot for taking a look at this issue!

szagr commented 2 years ago

@uytruong, thanks for raising this issue! It will be fixed in the next release.

szagr commented 2 years ago

Fixed in v1.0.3