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
F15454716: D19193.id45968.diff
Sat, Mar 29, 7:54 PM
F15449770: D19193.id45972.diff
Fri, Mar 28, 12:09 PM
F15443245: D19193.diff
Thu, Mar 27, 3:16 AM
F15440444: D19193.id.diff
Wed, Mar 26, 12:53 PM
F15436227: D19193.diff
Tue, Mar 25, 12:45 PM
F15429557: D19193.diff
Mon, Mar 24, 2:56 AM
F15383162: D19193.id.diff
Fri, Mar 14, 3:42 PM
Unknown Object (File)
Mar 3 2025, 5:01 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
Branch
image2
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningwebroot/rsrc/js/core/behavior-remarkup-load-image.js:1JAVELIN5`javelinsymbols` Not In Path
Unit
Tests Passed
Build Status
Buildable 19785
Build 26803: Run Core Tests
Build 26802: arc lint + arc unit

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.