File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
rivetkit-typescript/packages/rivetkit/src Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,18 @@ export { assertUnreachable } from "./common/utils";
33
44import type { Context as HonoContext , Handler as HonoHandler } from "hono" ;
55import { stringify as uuidstringify } from "uuid" ;
6-
6+ import { stringifyError } from "@/common/utils" ;
77import pkgJson from "../package.json" with { type : "json" } ;
8+ import { getLogger } from "./common/log" ;
89
910export const VERSION = pkgJson . version ;
1011
1112let _userAgent : string | undefined ;
1213
14+ function logger ( ) {
15+ return getLogger ( "utils" ) ;
16+ }
17+
1318export function httpUserAgent ( ) : string {
1419 // Return cached value if already initialized
1520 if ( _userAgent !== undefined ) {
@@ -177,12 +182,16 @@ export class SinglePromiseQueue {
177182
178183 try {
179184 await op ( ) ;
180- } catch {
181- // Swallow errors: callers only await cycle completion, not success
185+ // Notify all waiters for this cycle
186+ resolver ?. resolve ( ) ;
187+ } catch ( err ) {
188+ logger ( ) . error ( {
189+ msg : "error in SinglePromiseQueue drain loop" ,
190+ error : stringifyError ( err ) ,
191+ } ) ;
192+ // Reject all waiters for this cycle
193+ resolver ?. reject ( err ) ;
182194 }
183-
184- // Notify all waiters for this cycle
185- resolver ?. resolve ( ) ;
186195 }
187196 } finally {
188197 this . runningDrainLoop = undefined ;
You can’t perform that action at this time.
0 commit comments