Skip to content

Commit fb9c373

Browse files
committed
chore: add file path to telemetry save error message
1 parent 4cbc97a commit fb9c373

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/telemetry/persistence.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ export class FilePersistence implements Persistence {
6262
}
6363

6464
async saveState(state: LocalState): Promise<void> {
65+
const filePath = path.join(this.#dataFolder, STATE_FILE_NAME);
6566
try {
6667
await fs.mkdir(this.#dataFolder, {recursive: true});
67-
const filePath = path.join(this.#dataFolder, STATE_FILE_NAME);
6868
await fs.writeFile(filePath, JSON.stringify(state, null, 2), 'utf-8');
6969
} catch (error) {
7070
// Ignore errors during state saving to avoid crashing the server
71-
logger('Failed to save telemetry state:', error);
71+
logger(`Failed to save telemetry state to ${filePath}:`, error);
7272
}
7373
}
7474
}

0 commit comments

Comments
 (0)