Closed yevheniilavrenchuk closed 4 months ago
This is a common thing for the API response when it returns an empty array (on the API side there is no difference between an empty object and an empty array).
We already have EmptyArrayAsObjectConverter
in this client. This should probably be used in the TmPenalties
case as well.
@innomaxx what do you think?
This is a common thing for the API response when it returns an empty array (on the API side there is no difference between an empty object and an empty array).
We already have
EmptyArrayAsObjectConverter
in this client. This should probably be used in theTmPenalties
case as well.@innomaxx what do you think?
Yes, we can try fix it via custom converter, like in other similar cases, but it's a workaround rather than a long-term solution. I still recommend fix it API-widely on the Crowdin Backend side (if possible).
Unfortunately, there is no quick general fix for the API. Each case should be fixed individually. It will take a lot of time to fix it (creating a task, scheduling, reaching the sprint, etc), so it would be better to fix it on the API client side using the custom converter.
Ok I'll handle it until asap
@yevheniilavrenchuk available in 2.24.0
@yevheniilavrenchuk available in 2.24.0
Thanks, it works like a charm!
We are using the latest API released - 2.23.1
When Penalties are not filled in the Project settings, then in the API response it is an array:
But in API it is object:
When the request is made by the application, the error is thrown: