resthub / resthub-spring-stack

RESThub Spring stack
http://resthub.org/spring-stack.html
Other
121 stars 66 forks source link

Throw exception in Http Client when the request return 4xx or 5xx status code #109

Closed sdeleuze closed 12 years ago

sdeleuze commented 12 years ago

I think this could be a good default behaviour. Also, I think we should not throw checked exception since it make client painfull to use.

Any thoughts ?

bclozel commented 12 years ago

Good idea. Should we implement only two of those?

Or should we try to have some specific Exception for common cases like forbidden, notfound...

sdeleuze commented 12 years ago

Not sure. Perhaps we could reuse https://github.com/resthub/resthub-spring-stack/tree/master/resthub-web/resthub-web-server/src/main/java/org/resthub/web/exception by moving them to the resthub-web-common module ?

To be discussed ...

bclozel commented 12 years ago

opened issue #112 - moving exceptions to the resthub-web-common module. I'll submit a pull request for the HTTP Client.