/status does not return a 500 HTTP code if docWorkerRegistered fails (#928)

pull/929/head
Florent 1 month ago committed by GitHub
parent e28e1616ac
commit a8a421c833
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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