lduarte1991 / hxat

Contains the currently-in-development project by HarvardX to bring the annotation tool currently living in the edX platform to a more accessible LTI implementation.
12 stars 7 forks source link

Bugfix: get canvas id for mirador #152

Closed arthurian closed 2 years ago

arthurian commented 3 years ago

This PR ensures that the image annotation UI doesn't break if the IIIF manifest can't be retrieved or parsed.

By default, the tool will retrieve the manifest and extract the ID of the image that should be displayed in Mirador (i.e. the canvas ID). The problem is that if the request fails (e.g. HTTP 404, 500), then it will raise a JSONDecodeError which is shown to the user as a generic Internal Server Error. This PR fixes that so any errors are caught when retrieving/parsing the manifest.

Changes:

@lduarte1991