Page MenuHomePhabricator

Adjust how we handle exceptions
Closed, ResolvedPublic3 Estimated Story Points

Description

TBD: Similar to what we did for WS Export

Acceptance criteria

  • Expose errors from the OCR engine rather than hiding them behind the 500 error page
    • What this means for this specific ticket: If someone adds in a URL that is not an image file we recognize (i.e. end with jpg, png, etc), then an error message will occur.

Compare:

Event Timeline

ARamirez_WMF set the point value for this task to 3.Apr 8 2021, 5:42 PM
ARamirez_WMF moved this task from Needs Discussion to Up Next (June 3-21) on the Community-Tech board.
MusikAnimal removed the point value 3 for this task.
MusikAnimal set the point value for this task to 3.

We've added error handling for invalid image URLs (like the example in the description). I also did some work to capture 404s from GoogleCloudVision, that doesn't appear to work correctly in the prod environment (example). However I won't work on that any further until we replace our GoogleCloudVision package with the official one, which Sam has already started on (T277129).

So for this ticket, I suppose all we've done is better validate the URL that was given.

dom_walden subscribed.

So for this ticket, I suppose all we've done is better validate the URL that was given.

OK, so as mentioned we handle invalid image urls better: e.g.

url_validation.png (1,207×601 px, 54 KB)

('https://upload.wikimeida.org is misspelled T280141)

There are other types of exception (e.g.), but it looks like we will be handling those in later tickets.