[OAI-implementers] error questions
Simeon Warner
simeon@cs.cornell.edu
Tue, 25 Jun 2002 10:25:30 -0400 (EDT)
On Mon, 24 Jun 2002, Paul Cummins wrote:
> I know the protocol states that a single error is enough to trigger
> an error response but it seems to imply that all codes should be
> returned.
> If in the case of the illegal argument, where a value like
> test=zzzzzz is sent, should this short circuit the testing process
> and jump straight to the error response without testing from, until,
> set, etc., since someone could be trying to break something?
I think it is allowable to either short circuit checks or to test other
arguments.
> Should a multiple argument error be "badArgument" and then should we
> indicate which word was repeated? (example below)
>
> repository/oai?verb=Identify&set=set1&from=2000-01-01&set=set2
>
> errors:
> <error code="badArgument">The query contained an illegal
> argument--set</error>
> <error code="badArgument">The query contained an illegal
> argument--from</error>
> <error code="badArgument">The query contained an illegal
> argument--set</error>
>
> Are these all of the codes or should there be another one because
> Identify should have no other parameters?
I think the response above is fine.
The philosophy should be to provide error messages that are helpful
to someone trying to work out why their harvester isn't working.
--
Simeon
PS. My server checks for duplicate arguments first because the
arguments are then stored in a hash. Thus the error messages
from the request above are:
<error code="badArgument">Found illegal duplicate of argument 'set'.</error>
<error code="badArgument">Verb 'Identify', illegal argument 'set'.</error>
<error code="badArgument">Verb 'Identify', illegal argument 'from'.</error>