* @param {http.ServerResponse} res
* @param {object} ctx
*/
- async getHealthcheck(res, ctx) {
+ async getHealthcheck(res, ctx) {
const _scope = _fileScope('getHealthcheck');
const health = 'happy';
let fn, info, id;
try {
if (data.mode === Enum.Mode.Publish) {
- fn = 'topicPublish';
+ fn = 'topicFetchRequested';
info = await this.db.topicFetchRequested(dbCtx, data.topicId);
id = data.topicId;
} else {
fn = 'topicFetchClaimAndProcessById';
await this.communication.topicFetchClaimAndProcessById(dbCtx, id, requestId);
} else {
- fn = 'processVerification';
+ fn = 'verificationClaimAndProcessById';
await this.communication.verificationClaimAndProcessById(dbCtx, id, requestId);
}
} catch (e) {
this.logger.debug(_scope, 'called', { ctx });
// N.B. no await on this
- this.communication.worker.process();
+ this.communication.worker.process().catch((e) => {
+ this.logger.error(_scope, 'failed', { error: e, ctx });
+ });
res.end();
this.logger.info(_scope, 'invoked worker process', { ctx });