Skip to content

catch 502 errors when bulk(+single?) deploying #1

@leonstafford

Description

@leonstafford
$ wp wp2static deploy
PHP Fatal error:  Uncaught GuzzleHttp\Exception\ServerException: Server error: `PUT https://api.cloudflare.com/client/v4/accounts/HASH/storage/kv/namespaces/HASH/bulk` resulted in a `502 Bad Gateway` response:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>clou (truncated...)
 in /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /var/www/htdocs/wp-content/plugins/wp2static-addon- in /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: `PUT https://api.cloudflare.com/client/v4/accounts/HASH/storage/kv/namespaces/HASH/bulk` resulted in a `502 Bad Gateway` response:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>clou (truncated...)
 in /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /var/www/htdocs/wp-content/plugins/wp2static-addon- in /var/www/htdocs/wp-content/plugins/wp2static-addon-cloudflare-workers/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
Error: There has been a critical error on your website.Learn more about debugging in WordPress. There has been a critical error on your website.

Likely poor connection, possibly rate limit. Subsequent run fine

  • implement try/catch block
  • mark current 'processing' deployment job as 'failed'
  • WsLog error

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions