1

I configured the RestErrorHandler in my RestClient: restClient.setRestErrorHandler(restClientErrorHandler);

But it's not called.

I debugged the code and I see in the generated RestClient_ class that restTemplate.exchange is throwing an exception, but the try catch that calls my RestErrorHandler is being generated for response.getBody() and not the entire method.

Is this a bug in Androidannotations or am I doing something wrong?

I'm using my Androidannotations RestClient inside a Robo Spice request. Thanks!

bentzy
  • 1,244
  • 2
  • 15
  • 31
  • Do you have a sample of Android annotations + RoboSpice somewhere ? – Snicolas Apr 12 '14 at 10:51
  • Sorry, I don't have a sample online. In general, I have a Bean class, ServerHelper, that I inject anywhere I want to perform a network request. In ServerHelper I inject the RestClient and in each RoboSpice request, in loadDataFromNetwork I call the RestClient method I need. – bentzy Apr 13 '14 at 15:42
  • I am one of the maintainers of RS. If you get some time, we would appreciate an example. It could become part of RS and be added to our repo of samples. – Snicolas Apr 13 '14 at 20:44
  • @Snicolas sure I can do that. I love RS, I'd love to contribute if I can. How can we talk outside this question? :) – bentzy Apr 17 '14 at 13:03
  • Via RS mailing list ? – Snicolas Apr 17 '14 at 13:16

1 Answers1

3

This is an AA issue which has just been fixed today :) You may use the SNAPSHOT until we release a new version.

DayS
  • 1,561
  • 11
  • 15
  • Just checked it out today, and works great! Thanks! Sorry it took a while, I had a workaround working ;) – bentzy Jun 18 '14 at 14:13