Capturing Errors
Manual Capture
Manual capture is for errors you catch on purpose but still want to preserve. Typical examples include upstream timeouts, validation branches that should be investigated, and failures hidden behind retries.
try {
await chargeCard(input);
} catch (error) {
errorcore.captureError(error, {
tags: { flow: "checkout" },
context: { customerId: input.customerId },
});
}Use it sparingly. If every expected branch becomes a captured incident, the signal degrades fast.