diff --git a/logging/log.ts b/logging/log.ts index b2f5f8d3..77ad7c86 100644 --- a/logging/log.ts +++ b/logging/log.ts @@ -22,7 +22,8 @@ export type Tags = | 'invariant-violation' | 'state-transition' | 'invalid-request' - | 'unhealthy-session'; + | 'unhealthy-session' + | 'uncaught-handler-error'; const cleanedLogFn = (log: LogFn) => { return (msg: string, metadata?: MessageMetadata) => { @@ -53,7 +54,7 @@ export type MessageMetadata = Partial<{ traceId: string; spanId: string; }; - extras: unknown; + extras?: Record; }>; export class BaseLogger implements Logger { diff --git a/package-lock.json b/package-lock.json index fbbec3f9..89861420 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@replit/river", - "version": "0.200.3", + "version": "0.200.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@replit/river", - "version": "0.200.3", + "version": "0.200.4", "license": "MIT", "dependencies": { "@msgpack/msgpack": "^3.0.0-beta2", diff --git a/package.json b/package.json index 8802fa1d..9e874b3c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@replit/river", "description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!", - "version": "0.200.3", + "version": "0.200.4", "type": "module", "exports": { ".": { diff --git a/router/server.ts b/router/server.ts index 15d7bfed..a4df77f5 100644 --- a/router/server.ts +++ b/router/server.ts @@ -515,7 +515,9 @@ class RiverServer }, extras: { error: errorMsg, + originalException: err, }, + tags: ['uncaught-handler-error'], }, ); diff --git a/transport/impls/ws/connection.ts b/transport/impls/ws/connection.ts index 6a82149a..f7a1cbe8 100644 --- a/transport/impls/ws/connection.ts +++ b/transport/impls/ws/connection.ts @@ -1,7 +1,7 @@ import { Connection } from '../../connection'; import { WsLike } from './wslike'; -interface ConnectionInfoExtras { +interface ConnectionInfoExtras extends Record { headers: Record; }