Closed ChristiaanScheermeijer closed 3 months ago
Visit the preview URL for this PR (updated for commit 766793b):
https://ottwebapp--pr476-fix-coupon-feedback-blhze9wl.web.app
(expires Fri, 26 Apr 2024 11:11:12 GMT)
š„ via Firebase Hosting GitHub Action š
Sign: c198f8a3a199ba8747819f7f1e45cf602b777529
Description
This PR addresses an issue we found during testing. For some reason, there was no feedback when submitting a coupon code. I tried to reproduce this, but the only way I could was to make the
updateOrder
fetch fail. For example, Google Chrome can be put in "Offline" mode using the network tab.Because there was no feedback, I traced the code and remembered (and spotted some TOODs :-)) that the
updateOrder
method was a bit funky.This PR addresses some problems and solves the TODOs:
responseData.errors
to contain Error objects (only strings are expected)Although the generic error shows "Unknown error", we know the reason. But we should solve this problem structurally, not just for the
updateOrder
method.CC: @langemike