Handle 500/404, empty Content-Length and requestMaxSize with JSON error messages.

do we want to add the whole list of errors now ? will we add more implementation later ? if not we should increment properly and adapt API.md I guess