File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { tracingChannel } from "node:diagnostics_channel";
33import { describeMatrix , type TestOptions } from "./_setup.ts" ;
44import { H3 } from "../src/h3.ts" ;
55import { tracingPlugin , type H3THandlerTracePayload } from "../src/tracing.ts" ;
6+ import { HTTPError } from "../src/error.ts" ;
67
78type TracingEvent = {
89 start ?: { data : H3THandlerTracePayload } ;
@@ -167,7 +168,7 @@ describeMatrix(
167168
168169 try {
169170 t . app . get ( "/error" , ( ) => {
170- throw new Error ( "Handler error" ) ;
171+ throw new HTTPError ( "Handler error" ) ;
171172 } ) ;
172173
173174 await t . fetch ( "/error" ) ;
@@ -763,7 +764,7 @@ describeMatrix(
763764
764765 try {
765766 const errorFetchHandler = ( _ : Request ) => {
766- throw new Error ( "Fetch handler error" ) ;
767+ throw new HTTPError ( "Fetch handler error" ) ;
767768 } ;
768769
769770 t . app . mount ( "/error-fetch" , errorFetchHandler ) ;
You can’t perform that action at this time.
0 commit comments