From 28b4588a12397fb024bbfac71e08935ffd4f0132 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Fri, 11 Aug 2023 05:03:10 +0200 Subject: [PATCH] Fix [object Object] as error message Any errors thrown here are already objects of shape { message: string } --- components/invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/invoice.js b/components/invoice.js index 2dfbadf3..364938be 100644 --- a/components/invoice.js +++ b/components/invoice.js @@ -231,7 +231,7 @@ export const useInvoiceable = (fn, options = defaultOptions) => { }) return } - throw new Error({ message: error.toString() }) + throw error } } setFnArgs(args)