NpmMapping: Crash when "bugs" is an invalid URL
https://sentry.softwareheritage.org/organizations/swh/issues/104749/?referrer=phabricator_plugin
AttributeError: 'NoneType' object has no attribute 'endswith'
(8 additional frame(s) were not displayed)
...
File "pyld/jsonld.py", line 1811, in _compact
rval = self._compact_value(
File "pyld/jsonld.py", line 4987, in _compact_value
compacted = self._compact_iri(
File "pyld/jsonld.py", line 4892, in _compact_iri
return remove_base(base, iri)
File "pyld/jsonld.py", line 535, in remove_base
rel = parse_url(iri)
File "pyld/jsonld.py", line 624, in parse_url
if ((g[0] == 'https' and g[1].endswith(':443')) or
Problem during metadata translation for content eb28e4626aa5bd324ed38be4c73bf11f898ae111
original document:
[{@id: 'https://www.softwareheritage.org/schema/2022/indexer/tmp-node/e7dc94e8-62d7-4d10-9b9e-32d3b3ea9cb2', @type: ['http://schema.org/SoftwareSourceCode'], http://schema.org/author: None, http://schema.org/codeRepository: [{"@id":"'git+https:/github.com/fjc0k/sentry-wechat-miniprogram.git'"}], http://schema.org/description: [{"@value":"'@sentry/browser 的微信小程序版本。'"}], http://schema.org/keywords: [{"@value":"'sentry-wechat-miniprogram'"}], http://schema.org/license: [{"@id":"'https://spdx.org/licenses/MIT'"}], http://schema.org/name: [{"@value":"'sentry-wechat-miniprogram'"}], http://schema.org/version: [{"@value":"'0.1.3'"}], https://codemeta.github.io/terms/issueTracker: [{"@id":"'https:/github.com/fjc0k/sentry-wechat-miniprogram/issues'"}]}, {@id: '_:N63ce6554a9d14879963f9f7ece9b5b82', @type: ['http://schema.org/Person'], http://schema.org/email: [{"@value":"'fjc0kb@gmail.com'"}], http://schema.org/name: [{"@value":"'Jay Fong'"}], http://schema.org/url: [{"@id":"'https://github.com/fjc0k'"}]}]
Migrated from T4611 (view on Phabricator)