New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can.Model.findAll should reject if parseModels returns a non-array `data` property. #1662

m-mujica opened this Issue May 1, 2015 · 0 comments


None yet
2 participants

m-mujica commented May 1, 2015

If you have the following code:

can.fixture("/mymodels", function () {
  return {
    status: 'success',
    message: ''

var MyModel = can.Model.extend({
  findAll: "/mymodels",

  parseModels: function(raw) { = undefined;
    return raw;
}, {});

MyModel.findAll({}).then(success, error);

The error callback should be called and not the success callback.

@m-mujica m-mujica added the bug label May 1, 2015

@m-mujica m-mujica self-assigned this May 1, 2015

m-mujica added a commit that referenced this issue May 1, 2015

@daffl daffl added this to the 2.2.6 milestone May 1, 2015

@daffl daffl closed this in #1663 May 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment