API Better logging of curl errors during smoketesting

So that instead of getting errors like "HTTP code 0 doesn't match expected 200" we can see the actual error.