Closed xgedev closed 4 months ago
Hi @xgedev, Thank you for taking the time to raise this issue. It appears to be an inconsistency in our API. I have updated the code so that it doesn't throw an error while using this function while i work with the team to get the API fixed.
Thank you.
Great, thank you so much for implementing a fix this quickly.
What happened?
Hi! When fetching a Price from the API that does not have
unit_price_overrides
set, it returns an error and the current operation fails. This happened to me when trying to usepaddle.subscriptions.getPaymentMethodChangeTransaction(subId)
, it returns an error instead of the transaction but when I put a?
beforeprice.unit_price_overrides
inentities/price/price.js
, it works just fine.Steps to reproduce
new Paddle(apiKey)
.paddle.subscriptions.getPaymentMethodChangeTransaction(subId)
.What did you expect to happen?
The error should not be thrown. Instead, in
/dist/entities/price/price.js
price.unit_price_overrides
being undefined should be handled properly, for example using?
:Logs