orbitjs / orbit

Composable data framework for ambitious web applications.
https://orbitjs.com
MIT License
2.33k stars 134 forks source link

Improve Validation Errors #959

Open bellaappel opened 2 years ago

bellaappel commented 2 years ago

I have a type mismatch on one of my model attributes and received the following error:

Uncaught Error: Validation failed
- record operation is invalid
  - value is invalid
    at SyncSchemaValidationProcessor.validate (sync-schema-validation-processor.js:11:672)
    at MemoryCache._applyTransformOperation (sync-record-cache.js:28:3154)
    at MemoryCache._applyTransformOperations (sync-record-cache.js:28:2785)
    at MemoryCache._update (sync-record-cache.js:28:1408)
    at MemoryCache._update (memory-cache.js:44:206)
    at MemoryCache.update (sync-record-cache.js:18:4254)
    at MemorySource._applyTransform (memory-source.js:65:360)
    at MemorySource._sync (memory-source.js:13:75)
    at MemorySource.proto.__sync__ (syncable.js:21:997)

Is it possible to provide the name of the model and the name of the attribute that are causing the error?