Skip to content

improve error responses - #80

Merged
pdowler merged 3 commits into
ivoa-std:mainfrom
pdowler:main
Oct 15, 2026
Merged

pdowler merged 3 commits into
ivoa-std:mainfrom
pdowler:main

Conversation

@pdowler

@pdowler pdowler commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator
  • clarify that VOTable and plain text are example formats, but others can be specified
  • cleatly allow communication errors (network, auth, etc) to respond as suitable for off-the-shelf framworks or software
  • require content-type header whenever there is a response body (document)
  • restrict the 200 + error scenario to the case where the initial request is OK and the error happens while streaming the result (eg after the http response code has been sent)

See issue #74

@msdemlei

msdemlei commented Oct 6, 2026 via email

Copy link
Copy Markdown
Contributor

mbtaylor
mbtaylor previously approved these changes Oct 6, 2026

@mbtaylor mbtaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@mbtaylor

mbtaylor commented Oct 6, 2026

Copy link
Copy Markdown
Member

... but commenting on Markus's concerns: yes plain text is preferable, though I'm not really bothered about parseable text content of the error message, I'd just expect to pass that kind of thing on to the user to make sense of.

I'm assuming the reference to VOTable is to accommodate existing practice in DALI-compliant standards. Only if we decide not to worry about that kind of backward incompatibility then VOTable-formatted error documents could go.

@pdowler

pdowler commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

I tried to retain the previous intended behaviour with this sentence:

"If the service specification allows
the caller to specify output format (e.g. via the RESPONSEFORMAT parameter above
or an HTTP Accept header), the service should use the same format for the error
document where feasible and fall back to text/plain if necessary."

The "clarify that VOTable and plain text are example formats, but others can be specified" is certainly vague, but it is intended to go along with the above sentence: in future a service (standard) may include application/json and this is just to allow for a json error document if the caller asked for json. I certainly agree with the direction SCS2 is going with text/plain and if we had done that (instead of VOTable error docs) years ago I would not be writing this at all.


The whole output/error section is quite a mess now, but I didn't want to try to rewrite it from scratch and make it too hard to see the changes.

@msdemlei

msdemlei commented Oct 7, 2026 via email

Copy link
Copy Markdown
Contributor

@pdowler

pdowler commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

I agree that having both successful and error responses depend on RESPONSEFORMAT - in an attempt to allow clients to ignore content-type header in the response - was a bad idea, but we kind of did that by describing how to convey errors in VOTable.... So do we strongly encourage text/plain for errors now? What about existing errors-in-VOTable usage -- just sanction it under the

"Clients, in addition, have to be aware
that ...
may produce errors and messages not compliant with this pattern"

@msdemlei

msdemlei commented Oct 8, 2026 via email

Copy link
Copy Markdown
Contributor

@msdemlei

msdemlei commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Is this intended for review or do you still plan to add the SIAv2-style : format?

For history cosmetics, I think it would be cool to rebase -i this and make one or two commits out of it (but I'd be cool with a squash merge, too).

Comment thread DALI.tex Resolved
Comment thread DALI.tex Resolved
Comment thread DALI.tex Resolved
@pdowler

pdowler commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

I will remove some of the extra text I recently added and then squash...

I think refactoring some required error labels (from SIAv2 or WD-SCS) will mean we don't finish this until after the interop. That's not a bad thing, except it's been awhile and there is a lot of good stuff (xtypes) in here that people could be using... can that wait for 1.3?

@msdemlei

msdemlei commented Oct 14, 2026 via email

Copy link
Copy Markdown
Contributor

@pdowler

pdowler commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

I feel like this is done and addresses the items in issue #74 that were feasible for this version.
Once merged, I would like to publish an updated PR and update the RFC page.

@msdemlei msdemlei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still like to see SIAv2-compatible (minus the VOTabe encapsulation) rules for writing the error messages in DALI, but I'm fine with postponing this to 1.3, when we may have gathered a bit more experience with how this pans out in SCS2.

@pdowler
pdowler merged commit c1d67b5 into ivoa-std:main Oct 15, 2026
1 check passed
@pdowler pdowler mentioned this pull request Oct 15, 2026
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

Successfully merging this pull request may close these issues.

4 participants