Fix comparison between CustomError and string
parent
6d773f7d56
commit
b0a7237443
|
@ -255,7 +255,7 @@ const listSessionsWithDBKey = async (dbkey) => {
|
|||
const sessionInfo = await exports.getSessionInfo(sessionID);
|
||||
sessions[sessionID] = sessionInfo;
|
||||
} catch (err) {
|
||||
if (err === 'apierror: sessionID does not exist') {
|
||||
if (err.name === 'apierror') {
|
||||
console.warn(`Found bad session ${sessionID} in ${dbkey}`);
|
||||
sessions[sessionID] = null;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue