Skip to content

Commit

Permalink
fix(platforms): added more details to redis errors (#1813)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianHymer authored Oct 24, 2023
1 parent 0e004bc commit 259d05f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions platforms/src/utils/passport-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class PassportCache {
try {
await this.client.connect();
} catch (err: any) {
console.error("REDIS CONNECTION ERROR: Error connecting to redis");
console.error(`REDIS CONNECTION ERROR: Error connecting to redis ${String(err)}`);
}
}

Expand All @@ -39,7 +39,7 @@ export class PassportCache {
const value = await this.client.get(key);
return value;
} catch (err: any) {
console.error("REDIS CONNECTION ERROR: Error reading from redis");
console.error(`REDIS CONNECTION ERROR: Error reading from redis ${String(err)}`);
return null;
}
}
Expand All @@ -66,7 +66,7 @@ export class PassportCache {
try {
await this.client.del(key);
} catch (err: any) {
console.error("REDIS CONNECTION ERROR: Error deleting redis entry");
console.error(`REDIS CONNECTION ERROR: Error deleting redis entry ${String(err)}`);
return null;
}
}
Expand All @@ -75,7 +75,7 @@ export class PassportCache {
try {
await this.client.expire(key, expiresInSeconds);
} catch (err: any) {
console.error("REDIS CONNECTION ERROR: Error setting timeout");
console.error(`REDIS CONNECTION ERROR: Error setting timeout ${String(err)}`);
return null;
}
}
Expand All @@ -84,7 +84,7 @@ export class PassportCache {
try {
await this.client.disconnect();
} catch (err: any) {
console.error("REDIS CONNECTION ERROR: Error closing redis connection");
console.error(`REDIS CONNECTION ERROR: Error closing redis connection ${String(err)}`);
return null;
}
}
Expand Down

0 comments on commit 259d05f

Please sign in to comment.