We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ece88c5 commit 871b7bdCopy full SHA for 871b7bd
src/deploy.ts
@@ -350,7 +350,9 @@ class DeployBuildEffects implements BuildEffects {
350
try {
351
await this.apiClient.postDeployFile(this.deployId, sourcePath, outputPath);
352
} catch (error) {
353
- if (isHttpError(error) && error.statusCode === 413) {
+ // 413 is "Payload Too Large", however sometimes Cloudflare returns a
354
+ // custom Cloudflare error, 520. Sometimes we also see 502. Handle them all
355
+ if (isHttpError(error) && (error.statusCode === 413 || error.statusCode === 503 || error.statusCode === 520)) {
356
throw new CliError(`File too large to deploy: ${sourcePath}. Maximum file size is 50MB.`, {cause: error});
357
}
358
throw error;
0 commit comments