Commit c082fc19 authored by A. Koch's avatar A. Koch

dont fail on missing annotation

parent ac8bda45
Pipeline #1061 passed with stage
......@@ -38,9 +38,12 @@ class Metadata extends TinyEmitter {
source = req.query.url
}
else {
const result = await _this._annotations.getHandler(req)
annotation = result.data
source = annotation.body.source.id
try {
const result = await _this._annotations.getHandler(req)
annotation = result.data
source = annotation.body.source.id
}
catch (e) { /* ignored */ }
}
if (!source) return _this._errorResponse(res, 404)
const key = `metadata_${ObjectUtil.slug(source)}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment