Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebhookApi.listWebhooks() throws HttpException #250

Open
Marzuh opened this issue Jul 12, 2024 · 2 comments
Open

WebhookApi.listWebhooks() throws HttpException #250

Marzuh opened this issue Jul 12, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Marzuh
Copy link

Marzuh commented Jul 12, 2024

Actual:
WebhookApi.listWebhooks() throws HttpException

Error message:
HttpException.Error(code=null, message=Cannot deserialize value of type java.util.LinkedHashMap<java.lang.String,java.lang.String> from Array value (token JsonToken.START_ARRAY)
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 212] (through reference chain: com.crowdin.client.webhooks.model.WebhookResponseList["data"]->java.util.ArrayList[0]->com.crowdin.client.webhooks.model.WebhookResponseObject["data"]->com.crowdin.client.webhooks.model.Webhook["headers"]))

Expected:
WebhookApi.listWebhooks() returns ResponseList

Up to me its looks loike mapping error. If I change in WebHookApi.java:45
WebhookResponseList webhookResponseList = this.httpClient.get(this.url + "/projects/" + projectId + "/webhooks", new HttpRequestConfig(queryParams), WebhookResponseList.class); to WebhookResponseList webhookResponseList = this.httpClient.get(this.url + "/projects/" + projectId + "/webhooks", new HttpRequestConfig(queryParams), Object.class); there is no exception threw.

@andrii-bodnar andrii-bodnar added bug Something isn't working good first issue Good for newcomers labels Jul 12, 2024
@Marzuh
Copy link
Author

Marzuh commented Jul 12, 2024

Screenshot 2024-07-12 at 11 47 10

@Marzuh
Copy link
Author

Marzuh commented Jul 12, 2024

How to reproduce:
Setup at least one webhook in crowndin without any headers.
If all webhooks have not empty headers then no exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants