/status does not return a 500 HTTP code if docWorkerRegistered fails

pull/928/head
fflorent 2 months ago
parent e28e1616ac
commit 4f07fe9642

@ -474,7 +474,12 @@ export class FlexServer implements GristServer {
// be checked with the 'redis' parameter (the user may want to avoid
// removing workers when connection is unstable).
if (this._docWorkerMap.getRedisClient()?.connected) {
checks.set('docWorkerRegistered', asyncCheck(this._docWorkerMap.isWorkerRegistered(this.worker)));
checks.set('docWorkerRegistered', asyncCheck(
this._docWorkerMap.isWorkerRegistered(this.worker).then(isRegistered => {
if (!isRegistered) { throw new Error('doc worker not registered'); }
return isRegistered;
})
));
}
}
if (isParameterOn(req.query.ready)) {

Loading…
Cancel
Save