Page MenuHomePhabricator

When proxying an "{image ...}" image fails, show the user an error message
ClosedPublic

Authored by epriestley on Mar 8 2018, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 18, 10:31 PM
Unknown Object (File)
Thu, May 8, 7:59 AM
Unknown Object (File)
Mon, May 5, 11:36 PM
Unknown Object (File)
Wed, Apr 30, 11:31 AM
Unknown Object (File)
Apr 29 2025, 1:08 PM
Unknown Object (File)
Apr 25 2025, 7:19 AM
Unknown Object (File)
Apr 9 2025, 3:23 PM
Unknown Object (File)
Mar 29 2025, 7:54 PM
Subscribers
None

Details

Summary

Depends on D19192. Ref T4190. Ref T13101. Instead of directly including the proxy endpoint with <img src="..." />, emit a placeholder and use AJAX to make the request. If the proxy fetch fails, replace the placeholder with an error message.

This isn't the most polished implementation imaginable, but it's much less mysterious about errors.

Test Plan

Used {image ...} for valid and invalid images, got images and useful error messages respectively.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 8 2018, 3:03 PM
This revision was automatically updated to reflect the committed changes.