We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a0f82e commit 633c750Copy full SHA for 633c750
app/(pages)/(main)/volunteering/logs/voucherLogInput.js
@@ -51,7 +51,11 @@ export default function voucherLogInput(
51
setDescriptionVoucher("");
52
53
if (!res.ok) {
54
- setVoucherErrorMessage("Error while trying to use vouchers")
+ const data = await res.json()
55
+ if ("error" in data)
56
+ setVoucherErrorMessage(data.error)
57
+ else
58
+ setVoucherErrorMessage("Error while trying to use vouchers")
59
return
60
}
61
setRefresh();
0 commit comments