Skip to content

Commit 52a723e

Browse files
committed
Adjusting return value and error message
1 parent 73c58d3 commit 52a723e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/chargebee/actions/create-customer/create-customer.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ export default {
6464
}));
6565

6666
$.export("$summary", `Successfully created customer (ID: ${response?.customer?.id})`);
67-
return response;
67+
return response?.customer ?? response;
6868
},
6969
};

components/chargebee/actions/create-subscription/create-subscription.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default {
7777
return response;
7878
} catch (error) {
7979
$.export("debug", error);
80-
throw new Error("Error creating subscription. Check the debug export for more information.");
80+
throw new Error(`Error creating subscription: ${error.error_msg}`);
8181
}
8282
},
8383
};

0 commit comments

Comments
 (0)