Add: Extra control for bad response.

"JSON.parse(body);" cause an error ("SyntaxError: Unexpected token...") due body's value. Because it is just a string message (for example: "Invalid query parameter value for grid-id.") if the request/response is not successful.