Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix automatic handling of failures during image upload #18082

Closed
azaozz opened this issue Oct 23, 2019 · 3 comments
Closed

Fix automatic handling of failures during image upload #18082

azaozz opened this issue Oct 23, 2019 · 3 comments

Comments

@azaozz
Copy link
Contributor

azaozz commented Oct 23, 2019

Follow up from #17474.

After testing this in WP 5.3 beta and RC it became apparent that some servers may be configured to set different error codes on PHP fatal errors, for example 508 or 504. To catch all of them it would be best to look at all HTTP 5xx errors while post-processing images in #17858.

This is already implemented in the media modal and the old uploader code, see https://core.trac.wordpress.org/ticket/48379 and https://core.trac.wordpress.org/changeset/46566.

@azaozz
Copy link
Contributor Author

azaozz commented Oct 23, 2019

The only change needed would be from
( response.status === 500 || response.status === 502 )
to
( response.status >= 500 && response.status < 600 )

@azaozz azaozz changed the title Fix automatic handling of failyres during image upload Fix automatic handling of failures during image upload Oct 23, 2019
@youknowriad
Copy link
Contributor

Duplicate of #18081

@youknowriad youknowriad marked this as a duplicate of #18081 Oct 23, 2019
@azaozz
Copy link
Contributor Author

azaozz commented Oct 23, 2019

Ah, sorry, didn't see #18081 was just created for the same thing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants