[core] check session name in waitUntilStatus

This commit is contained in:
devlikepro committed 2025-03-27 14:36:36 +07:00
1 parent f82bd9eadf
commit ec7c0a5cb7
1 file changed
+6
+6
View File
@@ -150,6 +150,12 @@ export abstract class SessionManager
sessionName: string,
expected: WAHASessionStatus[],
): Promise<WhatsappSession> {
if (!sessionName) {
throw new UnprocessableEntityException({
error: `Session name is required`,
session: sessionName,
});
}
const running = await waitUntil(
async () => this.isRunning(sessionName),
this.WAIT_SESSION_RUNNING_INTERVAL,