You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'CustomError: EmptyResponse
at Child.<anonymous> (/home/aurel/projects/omnescode/node_modules/bookshelf/lib/model.js:719:21)
at PassThroughHandlerContext.finallyHandler (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/finally.js:57:23)
at PassThroughHandlerContext.tryCatcher (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/promise.js…8)
at _drainQueueStep (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/aurel/projects/omnescode/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:439:21)'
I'm actually getting the model to be updated with the values that i give to it.
I read the docs and it said that if i pass a {require: false} the error should not show, however the problem still persists even though i am passing the require:false and the actual model that i want to update does exist in the database.
The text was updated successfully, but these errors were encountered:
I think I know why this happens. In the first case the model instance created by new Exam() is empty, and when the model tries to refresh itself after saving there is no id to look for so you get the EmptyResponse error. Not sure how to solve this one, but it should be possible.
I do understand that this bug is not really something critical since there seem to be other working methods, but i thought giving the bookshelf team a heads up on this issue was a good idea.
Introduction
When trying to update a model i am getting a EmptyResponse error
Bookshelf version: 1.2.0
Knex version: 0.21.4
Steps to reproduce issue
When i want to save a model using:
I'm getting a EmptyResponse error:
While when doing it like this:
I'm actually getting the model to be updated with the values that i give to it.
I read the docs and it said that if i pass a
{require: false}
the error should not show, however the problem still persists even though i am passing therequire:false
and the actual model that i want to update does exist in the database.The text was updated successfully, but these errors were encountered: