Optional input: CorjReportInputimport * as Corj from 'caught-object-report-json';
try {
await fetchUser(id);
} catch (caught: unknown) {
logger.error({ error: Corj.makeCaughtObjectReport(caught) });
// { occurrence_id: 'CORJ_…', fingerprint: 'fp1_…', stack: ['Error: …', ' at …'], v: 'corj/v0.15' }
}
CorjMaker.makeReport with CORJ_DEFAULT_OPTIONS and the given overrides: the report as one object. Builds a CorjMaker from the options in
input; on a hot path construct oneCorjMakerand reuse it.