feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 742 forks source link

@feathersjs/schema resolver throws unhelpful error #3439

Open jd1378 opened 3 months ago

jd1378 commented 3 months ago

https://github.com/feathersjs/feathers/blob/181fedb026e21f5978cc32cecfc16c176cf78e59/packages/schema/src/resolver.ts#L138

this line of code throws with this error: Cannot convert undefined or null to object

which is unhelpful because I am not really understanding the cause of issue

I suggest checking if data is null or undefined and throwing a more helpful error on why it should not be null or undefined and what we can do about it

this is a very frustrating error that I keep getting in my development from time to time as I'm experimenting with feathersjs on how to do things

System configuration

Module versions : 5.0.23

NodeJS version: v20.10.0