-
Notifications
You must be signed in to change notification settings - Fork 40
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
Implementation opt-in error handling #8? #65
base: master
Are you sure you want to change the base?
Conversation
Revert "remove error function in proto" This reverts commit 4f91a9e.
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
please give some feedback, btw who is the maintainer? |
It seems @juliangruber is :) |
i'm not the only one :P see https://github.com/component/model/graphs/contributors |
so @ianstormtaylor what you think ;) |
sounds interesting, but i dont quite understand the use case. would you really want a single function to handle all types of errors? i havent run into the need for this, but havent been dealing with errors much |
You're right. One option is to handle all errors in the 'toError(fn)' function. |
+1, this is something I use (and one of the reasons for my own Model implementation)... |
Hey,
we have implemented a model plugin to handle errors. It's necessary for this, to get request errors (e.g. timeout/crossdomain) and return them on the "end" of a request.
Furthermore it's possible with this modification to manipulate the error info/data that is passed to the model callbacks (e.g. save( function(err){} )).
Perhaps this was something you meant with this issue (#8) also?
I'm excited about your feedback!
Frank.