rarecoil/unwebpack-sourcemap

Receiving a non-200 status code causes a TypeError

RA80533 opened this issue · 0 comments

TypeError: the JSON object must be str, bytes or bytearray, not NoneType

if result.status_code == 200:
return result.text
else:
print("WARNING: Got status code %d for URI %s" % (result.status_code, uri))
return False

data = self._get_remote_data(uri)
if data is not None:
self._parse_sourcemap(data, True)
else:
print("WARNING: Could not retrieve sourcemap from URI %s" % uri)

Line 218 should be changed to return None rather than False.