Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMPROVEMENT: get server side errror message when using PyVO #158

Open
agy-why opened this issue Mar 13, 2023 · 0 comments
Open

IMPROVEMENT: get server side errror message when using PyVO #158

agy-why opened this issue Mar 13, 2023 · 0 comments

Comments

@agy-why
Copy link
Member

agy-why commented Mar 13, 2023

PyVo provides an interface to return server side error message while using DalServices: ErrorSummary.
The later was broken but has been repaired in #155.

The problem however is that Daiquiri returns a 404 when starting job fails. For PyVO it means that the Client failed and a Client Error is returned. see: https://github.com/astropy/pyvo/blob/main/pyvo/dal/tap.py#L871

Instead Daiquiri should return a 200 with valid Job XML and Error Message.

The drawback is that more Failing Jobs will be generated. The advantage being that the error messages will be much clearer.

Alternatively the error could be propagated there: (but still not clear workflow).
https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/jobs/renderers.py#L83

The problem may come from here:
https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/jobs/viewsets.py#L118

  1. job is create
  2. job is processed (check quotas, user, translate query...)

The problem is here: when a non-existing column or table is requested it will fail here:

except QueryError as e:

For a Syntax issue here:

except QuerySyntaxError as e:

There are 3 related problems:

  1. the error information get lost between QueryError and UWSErrorRenderer.
  2. the job is destroyed and therefore the error can not be retrieved aposteriori.
  3. The response is a 404 which leads to a Client Error from PyVO although it is a server side error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant