Files
elysium/apps/web/src/utils/logError.ts
T
hikari 66413c5e21 fix: add comprehensive error handling and logging to api and web
Wrap all async API route handlers and services in try/catch blocks,
piping errors to the @nhcarrigan/logger telemetry service. Add a
frontend logError utility, React ErrorBoundary, and overridden console
to forward all unhandled client-side errors to the backend telemetry
endpoint.
2026-03-09 18:57:56 -07:00

20 lines
666 B
TypeScript

/**
* @file Frontend error logging utility that forwards errors to the backend telemetry service.
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
/* eslint-disable no-console -- Errors are forwarded to backend via the overridden console.error */
/**
* Logs an error to the backend telemetry service.
* Accepts the same arguments as console.error — conventionally a context string
* followed by the error value.
* @param logArguments - The values to log, forwarded directly to console.error.
*/
const logError = (...logArguments: Array<unknown>): void => {
console.error(...logArguments);
};
export { logError };