Yicong-Huang opened a new issue, #4725:
URL: https://github.com/apache/texera/issues/4725
### What happened?
`amber/src/main/python/pytexera/storage/dataset_file_document.py::DatasetFileDocument.get_presigned_url`
does `response.json().get("presignedUrl")`, so a 200 response that omits the
`presignedUrl` field silently returns `None` instead of raising. `read_file`
then calls `requests.get(None)` and the caller gets a less-actionable error
than the explicit-status path.
### How to reproduce?
```python
import os
from unittest.mock import patch, MagicMock
from pytexera.storage.dataset_file_document import DatasetFileDocument
os.environ["USER_JWT_TOKEN"] = "t"
os.environ["FILE_SERVICE_GET_PRESIGNED_URL_ENDPOINT"] = "http://x"
doc = DatasetFileDocument("/o/d/v/f.csv")
with patch("pytexera.storage.dataset_file_document.requests.get") as g:
g.return_value = MagicMock(status_code=200, **{"json.return_value": {},
"text": "{}"})
print(doc.get_presigned_url()) # prints None instead of raising
```
### Version
1.1.0-incubating (Pre-release/Master)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]