Noticed that if you have even just a minimalist Response object, say for an API endpoint
export async function handler() {
return new Response(undefined);
}
you will get an exception in the CLI for development
TypeError: Cannot read properties of null (reading 'indexOf')
at LiveReloadResource.shouldIntercept (file:///Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/cli/src/plugins/server/plugin-livereload.js:57:24)
at file:///Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/cli/src/lifecycles/serve.js:107:52
at async file:///Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/cli/src/lifecycles/serve.js:105:24
at async file:///Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/cli/src/lifecycles/serve.js:90:5
at async file:///Users/owenbuckley/Workspace/project-evergreen/repos/greenwood/packages/cli/src/lifecycles/serve.js:54:5
or this for production
Serve command with API specific behaviors with a minimal response
TypeError [ERR_INVALID_ARG_TYPE]: The "iterable" argument must be an instance of Iterable. Received null
Details
Looks to be caused by many assumptions of a particular header to be defined already in Resource plugin intercept lifecycles 🤦
Type of Change
Bug
Summary
Noticed that if you have even just a minimalist
Response
object, say for an API endpointyou will get an exception in the CLI for development
or this for production
Details
Looks to be caused by many assumptions of a particular header to be defined already in Resource plugin
intercept
lifecycles 🤦