Suppress verbose error in certificateStore
This commit is contained in:
@@ -10,6 +10,7 @@ Release date: TBD
|
||||
|
||||
### Improvements
|
||||
- "Cannot connect to Mattermost" is now on top of the page
|
||||
- Suppressed verbose error which is related to certificates
|
||||
|
||||
#### Windows
|
||||
- Copying a links address and pasting it inside the app now works
|
||||
|
@@ -26,11 +26,18 @@ function getHost(targetURL) {
|
||||
|
||||
var CertificateStore = function(storeFile) {
|
||||
this.storeFile = storeFile;
|
||||
let storeStr;
|
||||
try {
|
||||
this.data = JSON.parse(fs.readFileSync(storeFile, 'utf-8'));
|
||||
storeStr = fs.readFileSync(storeFile, 'utf-8')
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
storeStr = '{}';
|
||||
}
|
||||
try {
|
||||
this.data = JSON.parse(storeStr);
|
||||
}
|
||||
catch (e) {
|
||||
console.log('Error when parsing', storeFile, ':', e);
|
||||
this.data = {};
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user