Are you sure this is necessary i have create the test which fail (an incorrect Dockerfile) and i have a propre response with just an error : 

"{"stream":"Step 0 : FROM\n"}{"errorDetail":{"message":"build: Invalid Dockerfile format"},"error":"build: Invalid Dockerfile format"}"

Before my PR they were some errors with Timeout not properly catched but it should be fine right now