Skip to content
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

Errors in beforeSave and beforeRender hooks cause hangs #55

Closed
carlbennettnz opened this issue Aug 26, 2015 · 6 comments
Closed

Errors in beforeSave and beforeRender hooks cause hangs #55

carlbennettnz opened this issue Aug 26, 2015 · 6 comments

Comments

@carlbennettnz
Copy link
Contributor

beforeRender: function() {
    notAFunction()
}

Related: I can't figure out how I'm supposed to handle errors there. You mentioned something about the APIError type, but throwing or returning that causes hangs too. How do I reject a request entirely?

@ethanresnick
Copy link
Owner

I'll look into this later tonight. You're right about both problems, but I'm not sure what's going on here.

@ethanresnick
Copy link
Owner

Actually, I probably won't be able to look into these issues until early next week, but I'll get to them ASAP. Thanks again for all the detailed reports! They're really making the library much more robust. Keep 'em coming!

@carlbennettnz
Copy link
Contributor Author

No problem. I'll give some of the easier ones a shot over the weekend.

@ethanresnick
Copy link
Owner

👍

@ethanresnick
Copy link
Owner

@carlbennettnz Can you check if this is still an issue? I think it should have been fixed by 5018d8f. I.e., you should now be able to throw an error and have the request aborted and the error sent (in jsonapi format) back to the client.

@carlbennettnz
Copy link
Contributor Author

Works beautifully 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants