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
F18823320: D19193.id.diff
Thu, Oct 23, 11:19 AM
F18820811: D19193.diff
Wed, Oct 22, 5:14 PM
F18790575: D19193.diff
Wed, Oct 15, 3:42 PM
F18787311: D19193.diff
Tue, Oct 14, 11:07 PM
F18757549: D19193.diff
Sun, Oct 5, 6:04 PM
F18630890: D19193.diff
Sep 16 2025, 1:31 PM
F18619036: D19193.diff
Sep 15 2025, 1:34 AM
F18509411: D19193.id.diff
Sep 5 2025, 3:23 AM
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.