astropy / astropy/pyvo

Include more info in the DALServiceError for debugging purposes

Open
#251 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
88
Forks
64
Avg merge
38m
Merged PRs (30d)
1

Description

More information is require in the DALServiceError to enable debugging the problem on the server side:
- JOB ID or in case of a sync query, the last URL that produced the error (the URL contains the job ID)
- Body of the response might also contain useful info.
- Maybe the time or the exception (UTC)

Context. This is an example of the current stack:
```
File "/home/d.durand/anaconda3/lib/python3.8/site-packages/pyvo/dal/tap.py", line 246, in run_sync
return self.create_query(
File "/home/d.durand/anaconda3/lib/python3.8/site-packages/pyvo/dal/tap.py", line 942, in execute
return TAPResults(self.execute_votable(), url=self.queryurl, session=self._session)
File "/home/d.durand/anaconda3/lib/python3.8/site-packages/pyvo/dal/query.py", line 244, in execute_votable
self.raise_if_error()
File "/home/d.durand/anaconda3/lib/python3.8/site-packages/pyvo/dal/query.py", line 253, in raise_if_error
raise DALServiceError.from_except(e, self.queryurl)
pyvo.dal.exceptions.DALServiceError: 500 Server Error: Internal Server Error for url: https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/argus/sync
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in pyvo/dal/query.py at raise_if_error and the DALServiceError.from_except call shown in the stack trace. Trace how the sync URL and response exception reach DALServiceError, then determine which requested details are available consistently. Done means server-side errors expose useful request and response context without losing the existing error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.