Hello—
This is something that's really been bugging me for a while. Has anyone come up with a graceful solution for error handling with RestfulService? Here's a general scenario I'm talking about:
1. User visits a page that includes content (Twitter, Flickr, RSS feed, whatever) gathered from a web service using RestfulService.
2. When the server sends a request the web service, there is some sort of error (example: Twitter is down) and the response is empty or unusable.
3. The page shows a friendly message "We're having trouble communicating ... try refreshing your browser" or something like that.
For me, the most intuitive way to handle this process would be via error catching, but unfortunately SS doesn't seem to have support for that. A few options that I have considered, none of which have been very satisfactory:
- Chaining variables/functions through the stack that essentially pass the error as data (this gets ugly)
- Assigning some sort of global variable that is flagged when there is a communication error with the web service.
I am wondering if there's something that would integrate well with the SS stack that I might no know about (as I'm still getting the hang of this). Or maybe a workaround? Thoughts?
Thanks for your help,
Andy