🐛 oo-connector: do not crash if getting a health request before onlyoffice awake (#678)
because of my bug in the health endpoint, requesting it before onlyoffice is functioning caused the connector to crash
This commit is contained in:
@@ -28,6 +28,7 @@ class ForgottenProcessor implements IHealthProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async getHealthData() {
|
public async getHealthData() {
|
||||||
|
try {
|
||||||
const keys = await onlyofficeService.getForgottenList();
|
const keys = await onlyofficeService.getForgottenList();
|
||||||
return {
|
return {
|
||||||
forgotten: {
|
forgotten: {
|
||||||
@@ -36,6 +37,9 @@ class ForgottenProcessor implements IHealthProvider {
|
|||||||
locks: this.forgottenSynchroniser.getWorstStats(),
|
locks: this.forgottenSynchroniser.getWorstStats(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
} catch (e) {
|
||||||
|
return { forgotten: 'Error' };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user