Closed yasnmert closed 1 year ago
Hello, thank you for pointing this out, and for the proposed fix!
On first look, it seems like this might have slipped through the cracks unfortunately. We'll investigate and try to get a patch out as soon as possible. We'll keep you updated!
Thank you
@yasnmert Thanks for reporting this again. I have made a PR #257 to fix this and we are expecting to make a release sometime next week😁
Thank you
Software Version
6.3.0
Language Version
17
Operating System
Macos
What happened?
Hello,
the retrieve All Payloads and retrieve Payload methods added in version 6.2.0 give an error as follows.
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 552 path $.payloads[0].request_body
After my research, it seems that the error is caused by using the requestBody field in Payload class as a map. This field, which is expected as a map in the Payload class, comes as a String from the endpoint("events/" + eventId + "/payloads"). This situation is causing an exception.
When I call the endpoint with the following class example, returning a successful value;
What was expected?
The data that will come from the endpoint should be json or the 'requestBody' field in the payload class should be defined as a string.
Sample Code
No response
Relevant logs