@koloseum/utils 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils.ts +1 -1
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -48,7 +48,7 @@ export const Utility = {
|
|
|
48
48
|
const { data, error } = await supabase.functions.invoke(path, { method });
|
|
49
49
|
|
|
50
50
|
// Return error if any
|
|
51
|
-
if (error instanceof FunctionsHttpError) return { error: await error.context.json() };
|
|
51
|
+
if (error instanceof FunctionsHttpError) return { error: (await error.context.json()).message };
|
|
52
52
|
else if (error instanceof FunctionsRelayError) return { error: error.message };
|
|
53
53
|
else if (error instanceof FunctionsFetchError) return { error: error.message };
|
|
54
54
|
|