Skip to content

Conversation

pickworth
Copy link

handle undefined entityType

handle undefined entityType
@pickworth
Copy link
Author

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

@pofider
Copy link
Owner

pofider commented Aug 7, 2015

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.

@pickworth
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants