Skip to content

Commit 51cc37d

Browse files
committed
Update ETL error messages
1 parent 4269fc4 commit 51cc37d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/hydroserverpy/etl/extractors/http_extractor.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def extract(self, task: Task, loader=None):
3535
status = getattr(response, "status_code", None)
3636
if status in (401, 403):
3737
raise ValueError(
38-
"Authentication with the source system failed; credentials may be invalid or expired."
38+
"Authentication with the source system failed. The username, password, or token may be incorrect or expired."
3939
)
4040
if status == 404:
4141
raise ValueError(
42-
"The requested payload was not found on the source system."
42+
"The requested data could not be found on the source system."
4343
)
4444
if status is not None and status >= 400:
4545
logger.error(
@@ -58,7 +58,9 @@ def extract(self, task: Task, loader=None):
5858
data.seek(0)
5959

6060
if total_bytes == 0:
61-
raise ValueError("The source system returned no data.")
61+
raise ValueError(
62+
"The connection to the source worked but no data were returned."
63+
)
6264

6365
# Keep payload-level details at DEBUG; hydroserver-api-services already logs
6466
# a concise "Extractor returned payload" line for the end user.

0 commit comments

Comments
 (0)