File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,10 @@ export class RPCApiHandler<Schema extends SchemaDef> implements ApiHandler<Schem
101101 args = query ?. [ 'q' ]
102102 ? this . unmarshalQ ( query [ 'q' ] as string , query [ 'meta' ] as string | undefined )
103103 : { } ;
104- } catch {
105- return this . makeBadInputErrorResponse ( 'invalid "q" query parameter' ) ;
104+ } catch ( err ) {
105+ return this . makeBadInputErrorResponse (
106+ err instanceof Error ? err . message : 'invalid "q" query parameter' ,
107+ ) ;
106108 }
107109 break ;
108110
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ const factory = <Schema extends SchemaDef>(options: MiddlewareOptions<Schema>):
6161 } ) ;
6262 if ( sendResponse === false ) {
6363 // attach response and pass control to the next middleware
64- response . locals = {
64+ response . locals [ 'zenstack' ] = {
6565 status : r . status ,
6666 body : r . body ,
6767 } ;
You can’t perform that action at this time.
0 commit comments