async test(
data: {}
params: FlightMetadataParams,
) {
// do not nothing for this test
await setTimeout(5);
}
If you call this method, you will get an error on server side:
error: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Resolver.resolve (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\resolver.ts:138:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runResolvers (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\hooks\resolve.ts:22:17)
at async resolveAndGetDispatch (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\hooks\resolve.ts:160:26)
When looking at the code level, the resolver always expect an object so he can manipulate the property, but in case of custom method, we don't have any requirements in docs that that we must return an object (even empty).
Expected behavior
We should receive a 204 when the custom method return a promise.
Actual behavior
error: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Resolver.resolve (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\resolver.ts:138:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runResolvers (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\hooks\resolve.ts:22:17)
at async resolveAndGetDispatch (D:\workspaces\metaflight-flight-service\node_modules\@feathersjs\schema\src\hooks\resolve.ts:160:26)
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
Steps to reproduce
Hi,
Create a FeatherService with a custom method:
If you call this method, you will get an error on server side:
The issue is coming out from the resolveExternal.
here is the resolver definition:
When looking at the code level, the resolver always expect an object so he can manipulate the property, but in case of custom method, we don't have any requirements in docs that that we must return an object (even empty).
Expected behavior
We should receive a 204 when the custom method return a promise.
Actual behavior
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version: 20.x
Operating System: win10
Module Loader: 5.0.11