wasp icon indicating copy to clipboard operation
wasp copied to clipboard

How to catch Exception onError method

Open cutiko opened this issue 10 years ago • 4 comments

Greetings

We are having problems with the error 0. We cant figure it out what it is. So Im trying to implement New Relic, especifically this:

NewRelic.noticeNetworkFailure(String url, String httpMethod, long startTime, long endTime, Exception e)

This is the New Relic documentation

I have being looking in the repository but cant figure it out, and also trying to cast some of the error.somthing to Exception but is not posible.

How can we catch the exception in the onError method?

[EDITED] If you are reading this please follow the link to an explanation for the error 0 https://github.com/orhanobut/wasp/issues/139

cutiko avatar Mar 22 '16 15:03 cutiko

Hi @cutiko

I would admit that error handling is poor against the unknown errors. Let me check what I can do with this. Usually when there is an error which is not from network, as default status code is set to 0.

orhanobut avatar Mar 23 '16 09:03 orhanobut

Greetings @orhanobut

Thanks, I hate to ask for so much but we are having a lot of problems with error 0.

https://github.com/orhanobut/wasp/issues/99

https://github.com/orhanobut/wasp/issues/139

Thanks.

cutiko avatar Mar 23 '16 12:03 cutiko

Hi,

Is there a way to catch these exceptions? Like : volley.TimeoutError

ergunkocak avatar Apr 27 '16 13:04 ergunkocak

@ergunkocak we found a work around, I really like WASP, Im glad I didnt had to change https://github.com/orhanobut/wasp/issues/139 hope to help

cutiko avatar Apr 27 '16 13:04 cutiko