node-simple-odata-server icon indicating copy to clipboard operation
node-simple-odata-server copied to clipboard

Add more error handling

Open pickworth opened this issue 9 years ago • 3 comments

handle undefined entityType

pickworth avatar Aug 07 '15 08:08 pickworth

This was also required in my node application to stop it from crashing under certain data conditions

pickworth avatar Aug 07 '15 08:08 pickworth

In what conditions the entityType is not found? Seems to me it should be always found for the collection so we should rather find the reason why it is not found rather than silently ignore this.

pofider avatar Aug 07 '15 09:08 pofider

I'm dynamically creating entityTypes from an elasticsearch query (using get mappings API). Sometimes the mapping for a dataset does not exist. Therefore, an entityType will not exist for a EntitySet in my case. With this and #11 and #13, the API will still function (i.e return data) and not crash the node process.

pickworth avatar Aug 07 '15 12:08 pickworth