Skip to content

Commit

Permalink
return a response from generate to catch attempt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Im Khem authored and Im Khem committed Feb 9, 2023
1 parent 868cf9c commit defa9b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/common/helpers/provider/modules/green/green.ts
Expand Up @@ -51,7 +51,12 @@ export const useGreen = (

const handleGenerateGreen = useCallback(
async (phoneNumber: string) => {
if (masa) await masa?.green.generate(phoneNumber);
let response;
if (masa) {
response = await masa?.green.generate(phoneNumber);
}

return response;
},
[masa]
);
Expand Down

0 comments on commit defa9b7

Please sign in to comment.