8000 how to handle server error 500 on Model.find? · Issue #134 · getoutreach/epf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
how to handle server error 500 on Model.find? #134
Open
@ghost

Description

I'm trying to handle error 500 failures and I can't figure out how to prevent the rest adapter from choking. I've extended the PayloadSerializer to check the status code on the xhr and return something different if the code is 500, but I have no idea what to return to keep from hitting an internal assertion. Ideally, I'd just handle it in $(document).ajaxError, but the request never seems to bubble up to there.

Instead, execution just stops with this stack trace:

GET http://localhost:3000/slots 500 (Internal Server Error) jquery.js?body=1:9667
Error: Assertion Failed: Cannot call get with 'typeKey' on an undefined object.
    at new Error (native)
    at Error.Ember.Error (http://localhost:3000/assets/ember.js?body=1:911:19)
    at Object.Ember.assert (http://localhost:3000/assets/ember.js?body=1:74:11)
    at get (http://localhost:3000/assets/ember.js?body=1:2169:9)
    at require.define.Ep.IdManager.Ember.Object.extend._generateClientId (http://localhost:3000/assets/epf_a06b0350.js?body=1:4241:16)
    at require.define.Ep.IdManager.Ember.Object.extend.reifyClientId (http://localhost:3000/assets/epf_a06b0350.js?body=1:4229:29)
    at require.define.Ep.Session.Ember.Object.extend.reifyClientId (http://localhost:3000/assets/epf_a06b0350.js?body=1:2095:24)
    at require.define.Ep.Session.reopen.merge (http://localhost:3000/assets/epf_a06b0350.js?body=1:1767:14)
    at merge (http://localhost:3000/assets/epf_a06b0350.js?body=1:280:28)
    at http://localhost:3000/assets/epf_a06b0350.js?body=1:286:17 ember.js?body=1:3522
Uncaught Error: Assertion Failed: Error: Assertion Failed: Cannot call get with 'typeKey' on an undefined object. ember.js?body=1:74

Any hints about what I can return would be very welcome. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0