(or is this too trivial a function for me to PR?)

On Monday, July 24, 2017 at 11:22:37 PM UTC+10, Alec Taylor wrote:
>
> So basically I need to wrap a handler for some classes of errors at the 
> Service level, then return it as an Observable so that Subscribers from 
> Components can handle the other class of errors, and how to share 
> information to the user?
>
> Seems like the kind of wrapper Angular should provider out-of-the-box.
>
> On Monday, July 24, 2017 at 3:57:23 PM UTC+10, Sander Elias wrote:
>>
>> Hi Alec,
>>
>> If you want to propagate errors outside of your service, you have to 
>> (re)throw them from within your catch handler. If you don't, your server 
>> doesn't expose any error's. 
>> You have to me smart about this. Because, you might want to handle a 
>> 'data-not-there' error differently from an 'hey-you-need-to-be-authed' 
>> error, while you might just want to do a retry on a network-level error. 
>> It's not all black and white here, and you have to handle every situation 
>> differently. 
>>
>> Regards
>> Sander
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to