suport arbitrary json responses in rest request errors
always throw RestException on rest error responses
Fix issue #510: Support text blocks in Diet templates
Merge pull request #533 from Extrawurst/master

suport arbitrary json responses in rest request errors
Merge pull request #518 from nazriel/issue510

Fix issue #510: Support text blocks in Diet templates