This commit is contained in:
boufni95 2023-12-15 20:54:19 +01:00
parent b41a867f53
commit 81e1e9b51b
6 changed files with 2164 additions and 2162 deletions

View file

@ -418,6 +418,7 @@ export default (methods: Types.ServerMethods, opts: NostrOptions) => {
}
} catch(ex) {const e = ex as any; logger.error(e.message || e); callsMetrics.push({ ...opInfo, ...opStats, ...ctx, error: e.message }); responses.push({ status: 'ERROR', reason: e.message || e })}
}
stats.handle = process.hrtime.bigint()
res({ status: 'OK', responses })
opts.metricsCallback([{ ...info, ...stats, ...ctx }, ...callsMetrics])
}catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e }