Closed aral closed 10 years ago
Hello,
Actually I'm rejecting the promise with a timeout error when the request have a timeout, we can see it here:
.on('timeout', function() {
reject(new Promise.TimeoutError());
})
I'm open to discuss how to handle that. I can do it better throwing a new Error
object instead using the bluebird Promise.TimeoutError
which is just a object literal with the name of the error and the message.
What you can do to handle the timeout is in the rejectCallback from the promise verify which error did you get and handle it there.
This answered your question?
Hey Lucas,
I couldn’t see the examples for progress and timeout handling, etc. How are these handled in restling vs. restler. Are they supported and/or are you planning on adding support?
Thanks!