There is a verification check function implemented as follows:
async verifyWithOTP(phone: string, otp: string) {
console.log({ phone, otp });
try {
console.log("awaiting verification");
const verification = await client.verify.v2
.services("VA32f14036285fccdcc0a7ac76ac424515")
.verificationChecks.create({
to: phone,
code: otp,
});
console.log(verification.status);
console.log("verification successful");
return true;
} catch (error) {
console.log("failed to verify:", error);
return false;
}
}
This function is invoked in elysiajs running in Bun runtime. However, the promise does not resolve and the code appears to be stuck after logging "awaiting verification." Even though the Twilio dashboard shows approval for the request, it seems like the client may be experiencing a hang issue. Should I explore alternative solutions or consider migrating to a node-based backend framework?