Repository navigation
improve error responses - #80
Conversation
|
On Mon, Oct 05, 2026 at 01:44:47PM -0700, Patrick Dowler wrote:
- clarify that VOTable and plain text are example formats, but
others can be specified
I think I'm fairly unhappy with that. Sure: All kinds of things can
go wrong between client code and server code, and for the in-between
errors we can't say much.
But when client and server actually talk to each other, I am really,
really sure we should say what the client can expect in case of
errors. While I think plain text with some sort of category code and
human-readable text otherwise is probably the least stressful we can
do, I'm open to alternatives. But we should be clear what it is to
give clients the easiest possible time figuring out what to sensibly
display to users. This is far more important than any kind of
server-side implemenation convenience.
And it seems to me that this can be written in a halfway sane way.
Here's what I wrote for SCS2 the other day:
<https://github.com/msdemlei/SCS2/pull/1/changes>. I'd really love
to see similar language in DALI (sans the reference to DALI, of
course:-).
|
|
... 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. |
|
I tried to retain the previous intended behaviour with this sentence: "If the service specification allows 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. |
|
On Tue, Oct 06, 2026 at 01:24:35PM -0700, Patrick Dowler wrote:
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.
It would still be nice if DAL standards could simply reference what
SIAv2 and now SCS say locally about text/plain error messages with a
machine-readable tag in front of a colon and be done with it. My
preferred solution would be that that material becomes the body of
sect. 5.2 and all the hedging about exceptions became some
afterthought-type text of the sort:
Where concrete protocols have a strong reason to deviate from this
pattern, they may do so. Clients, in addition, have to be aware
that intermediate infrastructure or even the local network stack
may produce errors and messages not compliant with this pattern.
However, I think I am substantially unhappy about
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.
This would mean we'd have to say how error messages look like in
VOTable, FITS, Parquet, and whatever. Let's not do this. *If* one
day someone actually needs to return JSON-structured errors for some
good reason, they can claim a general exception. For anything else,
RESPONSEFORMAT-varying error formats would be a huge pain.
Side remark: I'd avoid talking about Accept in a DAL context, because
its interference with RESPONSEFORMAT would be a major nightmare. I
could well see myself draft some apologetic remark to that effect in
DALI's section 4.3.3.
|
|
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 |
|
On Wed, Oct 07, 2026 at 10:25:14AM -0700, Patrick Dowler wrote:
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
We have always been somewhat cavalier in DALI to specify things as
"from here on"; ConeSearch-1 has been in fairly gross violation for
DALI ever since DALI-1.0 and we didn't feel a major need to explain
that.
I think a brief comment on why we do the change would be enough.
Perhaps:
Previous versions of this document foresaw errors encapsulated in
VOTable documents, and at the time of writing most concrete DAL
standards still require those. New standards and new major
versions should abandon this pattern that proved to be a
significant implemantion burden without proportional benefit.
|
|
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). |
|
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? |
|
On Tue, Oct 13, 2026 at 03:26:05PM -0700, Patrick Dowler wrote:
pdowler left a comment (ivoa-std/DALI#80)
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?
For SCS2, I can live with having the spec inline (and perhaps mature
it there), at least as long as it doesn't openly conflict with what
DALI 1.2 says (I think it's marginally in line even with DALI 1.1).
|
|
I feel like this is done and addresses the items in issue #74 that were feasible for this version. |
msdemlei
left a comment
There was a problem hiding this comment.
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.
See issue #74