fix OptimistickLockError message #10068
It leads to this:
With the fix the error looks like:
Pull Request check-list
Please make sure to review and check all of these items:
Description of change
@@ Coverage Diff @@ ## master #10068 +/- ## ======================================= Coverage 96.3% 96.3% ======================================= Files 63 63 Lines 9413 9413 ======================================= Hits 9065 9065 Misses 348 348
`BaseError` expects to receive `message`, but the `options` object is being passed. It leads to this: ``` SequelizeOptimisticLockError: [object Object] ``` With the fix the error looks like: ``` SequelizeOptimisticLockError: Attempting to update a stale model instance: Customers ```
@sushantdhiman with all respect, I don't think that integration test is necessary here. The change is very minor and it just does the thing which was originally meant by author.
So I've put additional unit test, just to be rock solid, that message it there and has correct format.