twilio-java
twilio-java copied to clipboard
Latest Twilio Java SDK breaks Job endpoint
Issue Summary
Job.fetcher(jobSid).fetch failed with the exceptions posted.
Steps to Reproduce
- This is the first step
- This is the second step
- Further steps, etc.
Code Snippet
Job.fetcher(jobSid).fetch
Exception/Log
Exception in thread "main" com.twilio.exception.ApiException: Cannot deserialize value of type `java.util.LinkedHashMap<java.lang.String,java.lang.Object>` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (ByteArrayInputStream); line: 1, column: 348] (through reference chain: com.twilio.rest.bulkexports.v1.export.Job["details"])
at com.twilio.rest.bulkexports.v1.export.Job.fromJson(Job.java:84)
at com.twilio.rest.bulkexports.v1.export.JobFetcher.fetch(JobFetcher.java:61)
at com.twilio.rest.bulkexports.v1.export.JobFetcher.fetch(JobFetcher.java:30)
at com.twilio.base.Fetcher.fetch(Fetcher.java:40)
Technical details:
- twilio-java version: 9.6.2
- java version: 11
HI @ukby1234 , Thanks for reaching out and pointing out the issue, we have been able to reproduce it. Will inform once the fix is available.
@kridai any updates on this bug?
@ukby1234 I am actively working on the fix of above issue. Will be updating soon.
@ukby1234 I tried calling the API using Postman, and it turns out that the 'details' should be an array of hashmaps instead of a single hashmap. This appears to be a bug in how the API specifications are declared, which is why the SDK is currently using it as a hashmap. I will work to rectify this issue internally and will inform you once it is resolved.
I have again reminded the concerned team.
@sbansla any updates on this issue?