mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-22 07:28:21 +00:00
fix(csv-enricher): Add HTTP status code checking for remote file fetches (#15454)
This commit is contained in:
parent
d9fc440c5f
commit
7af6063bf3
@ -632,6 +632,7 @@ class CSVEnricherSource(Source):
|
||||
if parsed_location.scheme in ("http", "https"):
|
||||
try:
|
||||
resp = requests.get(self.config.filename)
|
||||
resp.raise_for_status() # Raise an exception for HTTP error status codes
|
||||
decoded_content = resp.content.decode("utf-8-sig")
|
||||
rows = list(
|
||||
csv.DictReader(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user