Skip to content

Commit a74af9a

Browse files
committed
Throw for unhandled file-not-found action type
1 parent 5aa94bb commit a74af9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/php-wasm/universal/src/lib/php-request-handler.ts

+8
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,14 @@ export class PHPRequestHandler {
396396
break;
397397
case '404':
398398
return PHPResponse.forHttpCode(404);
399+
default:
400+
throw new Error(
401+
'Unsupported file-not-found action type: ' +
402+
// Cast because TS asserts the remaining type is `never`
403+
`'${
404+
(fileNotFoundAction as FileNotFoundAction).type
405+
}'`
406+
);
399407
}
400408
}
401409

0 commit comments

Comments
 (0)