Skip to content

Commit d18eaca

Browse files
fix test missing url
1 parent 08213aa commit d18eaca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sim/lib/core/utils/with-route-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function withRouteHandler<T>(handler: RouteHandler<T>): RouteHandler<T> {
2424
const requestId = generateRequestId()
2525
const startTime = Date.now()
2626
const method = request.method
27-
const path = request.nextUrl.pathname
27+
const path = request.nextUrl?.pathname ?? new URL(request.url ?? '/', 'http://localhost').pathname
2828

2929
return runWithRequestContext({ requestId, method, path }, async () => {
3030
let response: NextResponse | Response

0 commit comments

Comments
 (0)