loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
79 stars 56 forks source link

Fail fast for mismatched field values #21

Open pulkitsinghal opened 9 years ago

pulkitsinghal commented 9 years ago
boot:create-model-instances (41) created +2ms
    TeamModel { ownerId: 'zzz@yyy.com', memberId: NaN, id: 1 }

As the log statement shows, currently life goes on (memberId: NaN) and errors that crop-up because of a mismatch in field value versus field type are not caught on the spot but instead during user/end-2-end/functional testing.

Let's do something about this and fail fast to ensure that the developers know right away when something is wrong.