Exception display improvement
We need to display the error in more user-friendly way to show that this is a 404 error.
C:\Project\OSDU\CodeBase\data-ingestion\LAS\wellbore-ddms-data-loader\venv\Scripts\python.exe C:/Project/OSDU/CodeBase/data-ingestion/LAS/wellbore-ddms-data-loader/demo/LAS_Loader_WellboreDDMS.py
Successfully authenticated
(1/6) Parsing Las File for header info...
(2/6) Creating wellbore record from LAS data...
Traceback (most recent call last):
File "C:\Project\OSDU\CodeBase\data-ingestion\LAS\wellbore-ddms-data-loader\demo\LAS_Loader_WellboreDDMS.py", line 92, in <module>
wellbore_id = res.json()["recordIds"][0]
File "C:\Project\OSDU\CodeBase\data-ingestion\LAS\wellbore-ddms-data-loader\venv\lib\site-packages\httpx\_models.py", line 1514, in json
Response: b'<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>openresty</center>\r\n</body>\r\n</html>\r\n'
return jsonlib.loads(self.content.decode(encoding), **kwargs)
File "C:\Users\0023OI744\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\0023OI744\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\0023OI744\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Process finished with exit code 1