[core] check session name in waitUntilStatus
This commit is contained in:
1 parent
f82bd9eadf
commit
ec7c0a5cb7
1 file changed
+6
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user