Skip to content

Instantly share code, notes, and snippets.

@rattrayalex
Created August 31, 2014 10:23
Show Gist options
  • Save rattrayalex/820761b7047f5b12bef4 to your computer and use it in GitHub Desktop.
Save rattrayalex/820761b7047f5b12bef4 to your computer and use it in GitHub Desktop.
sails destroy error
error: Sending 500 ("Server Error") response:
[ { type: 'update',
collection: 'trip',
criteria: { id: 20 },
values: { creator: null },
err:
Error (E_VALIDATION) :: 1 attribute is invalid
:
at WLValidationError.WLError (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/error/WLError.js:33:18)
at new WLValidationError (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/error/WLValidationError.js:20:28)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:45:43
at allValidationsChecked (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:195:5)
at done (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:135:19)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:32:16
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:186:14
at done (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:135:19)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:32:16
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:157:64
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:125:13
at Array.forEach (native)
at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:46:24)
at Object.async.each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:124:9)
at validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:156:11)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:125:13
at Array.forEach (native)
at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:46:24)
at Object.async.each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:124:9)
at [object Object].Validator.validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:192:9)
at async.series.runner (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:41:25)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:160:25
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:251:21
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:615:34
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:35:11
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:157:25
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:29:13
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/schema.js:151:44
at runner (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:27:11)
at iterate (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at Object.async.eachSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:165:9)
at async.series.self._validator.validate.WLValidationError.invalidAttributes (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:33:15)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at async.eachSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:165:9)
at _asyncMap (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:248:13)
at Object.mapSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:231:23)
at Object.async.series (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:608:19)
at bound.module.exports.validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:22:11)
at bound [as validate] (/usr/local/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at Object.runner.validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:25:11)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/update.js:160:17
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at async.eachSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:165:9)
at _asyncMap (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:248:13)
at Object.mapSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:231:23)
at Object.async.series (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:608:19)
at bound.beforeCallbacks (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/update.js:156:9)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/update.js:50:21
at Object.async.each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:121:20)
at bound.createBelongsTo (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/update.js:101:9)
at bound.module.exports (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/update.js:47:19)
at bound [as update] (/usr/local/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at [object Object].Remove.removeRecord (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:170:14)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:113:10
at replenish (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:194:21)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:211:15
at Object.async.eachLimit (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:171:12)
at [object Object].Remove.removeAssociations (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:112:9)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:80:10
at iterate (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:149:13)
at Object.async.eachSeries (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:165:9)
at [object Object].Remove.removeCollectionAssociations (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:79:9)
at new module.exports (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/associationMethods/remove.js:42:8)
at Array.async.auto.removeAssociations [as 2] (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/model/lib/defaultMethods/save.js:124:14)
at listener (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:493:46)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:444:17
at Array.forEach (native)
at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:46:24)
at Object.taskComplete (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:443:13)
at processImmediate [as _immediateCallback] (timers.js:345:15)
Invalid attributes sent to Trip:
• creator
• "required" validation rule failed for input: null
} ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment