Better error message when connecting with REST 

Today a SQLException is generated from the HTTP error code.

It's better to get the message inside the content of the response.