https://bugzilla.wikimedia.org/show_bug.cgi?id=48900

       Web browser: ---
            Bug ID: 48900
           Summary: Handle http errors + missing image errors in
                    LinkHandler image handling code
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JS/General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Image patch (https://gerrit.wikimedia.org/r/#/c/57817/) is missing error
handling when the mw API is queried to get information about an image.

Two kind of errors that handleResponse in LinkHandler.js has to deal with:

(1) API error: Given that ApiRequest retries, an api error is an indication
that the api may be temporarily down or that something else is wrong.  So,
rather than continue, it is better to abort processing and return an error code
to the clients so they can handle it however they want (ex: ve might tell the
user that the page cannot be edited right now because of api/server issues). 
This will require calling the error callback found in env.

(2) Image missing: If the api comes back and tells us that the image is
missing, we should handle this similar to how the PHP parser does it for
missing images.
- Maybe link to a special page/url that will let VE present an upload handler
(check with VE folks as to what this url could be.  PHP parser behavior can be
found by editing a page on wikipedia sandbox with a non-existent image)
- Dont add a thumb.
- Add a special rdf type on the image/wrapper tag: mw:Image/Missing maybe?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to