1 2 3 4 5 6 7 8
if (mt_rand(0,20) >= 15) { throw new \GuzzleHttp\Exception\ServerException( '502 bad gateway test', new \GuzzleHttp\Psr7\Request('GET', 'http://example.org/'), new \GuzzleHttp\Psr7\Response(502), ); }