You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all! I have already opened a zendesk ticket for this, so I apologize for the duplication, but I figured it might be more efficient to post it here.
If I call the listCoupons function without any filters, it works perfectly, and I'm able to list all coupons successfully. e.g.
listCoupons({
currencyPrices: true,
});
However, if I input a codes filter, I get a 500 error. e.g.
Note that the issue occurs regardless of whether the code I pass exists or not. (Even if the code does not exist I'd expect an empty array, and not an error 500).
So it would seem the Node SDK is incorrectly encoding the query parameters when providing a filter to the listCoupons method.
But I wanted to check with you all. Maybe I'm doing something wrong?
The text was updated successfully, but these errors were encountered:
Hey @hookdump, seems like it's bug in the SDK indeed (the other thing is the API shouldn't throw 500 in that case). We'll be looking into it and keep you updated, thanks for reporting.
Hey all! I have already opened a zendesk ticket for this, so I apologize for the duplication, but I figured it might be more efficient to post it here.
If I call the
listCoupons
function without any filters, it works perfectly, and I'm able to list all coupons successfully. e.g.However, if I input a codes filter, I get a 500 error. e.g.
I get...
Looking at the URL in the error message, I noticed it's urlencoded:
https://churnkey.chargify.com/coupons.json?filter%5Bcodes%5D%5B0%5D=5OFFzzz¤cy_prices=true
So I tried to directly call the API, but decoded, and it works properly:
https://churnkey.chargify.com/coupons.json?filter[codes]=5OFFzzz¤cy_prices=true
Note that the issue occurs regardless of whether the code I pass exists or not. (Even if the code does not exist I'd expect an empty array, and not an error 500).
So it would seem the Node SDK is incorrectly encoding the query parameters when providing a filter to the
listCoupons
method.But I wanted to check with you all. Maybe I'm doing something wrong?
The text was updated successfully, but these errors were encountered: