fix: improve error handling and logging in various components
This commit is contained in:
5 files changed
+139
-168
No files matched your search
+6
-1
@@ -44,7 +44,8 @@ export class Config {
|
||||
this.encrypt && this.crypto ? this.crypto.decrypt(fileStream) : fileStream
|
||||
) as Record<string, unknown>;
|
||||
this.config = decryptedJSON;
|
||||
} catch {
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.config = {};
|
||||
await this.save();
|
||||
}
|
||||
@@ -63,6 +64,10 @@ export class Config {
|
||||
});
|
||||
}
|
||||
|
||||
values () {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
value(key: string) {
|
||||
return {
|
||||
set: <T>(val: T) => {
|
||||
|
||||
Reference in new issue
Block a user