suport arbitrary json responses in rest request errors
always throw RestException on rest error responses
Merge pull request #533 from Extrawurst/master

suport arbitrary json responses in rest request errors