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
F14768478: D19193.id45972.diff
Thu, Jan 23, 7:10 PM
Unknown Object (File)
Tue, Jan 21, 3:43 PM
Unknown Object (File)
Tue, Jan 21, 12:33 PM
Unknown Object (File)
Sat, Jan 18, 3:08 AM
Unknown Object (File)
Fri, Jan 17, 3:26 PM
Unknown Object (File)
Wed, Jan 15, 6:06 AM
Unknown Object (File)
Sun, Dec 29, 11:18 PM
Unknown Object (File)
Thu, Dec 26, 7:28 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.