We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c533126 commit 16451f5Copy full SHA for 16451f5
backend/companion/getKcpToken.js
@@ -47,5 +47,10 @@ export async function getKcpToken() {
47
48
function getLocalCredentials() {
49
const fs = require('fs');
50
- return JSON.parse(fs.readFileSync('companion/credentials.json', 'utf8'));
+ try {
51
+ return JSON.parse(fs.readFileSync('companion/credentials.json', 'utf8'));
52
+ } catch (error) {
53
+ console.warn('Local credentials file not found or could not be read');
54
+ return null;
55
+ }
56
}
0 commit comments