Map JSON/IO errors to HTTP status 400