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.
This commit is contained in:
2026-03-09 18:57:56 -07:00
committed by Naomi Carrigan
parent 11e97325cb
commit 66413c5e21
30 changed files with 2297 additions and 1724 deletions
+19
View File
@@ -0,0 +1,19 @@
/**
* @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 };