[OAI-implementers] error reporting

Michael L. Nelson mln@ils.unc.edu
Mon, 24 Jun 2002 13:23:54 -0400 (EDT)


On Mon, 24 Jun 2002, deridder wrote:

> 
> I'm afraid I wasn't clear.
> Is is forbidden to use an error code for this situation since it is not
> in the protocol?

yes, it is forbidden.  you can't make up your own error codes and have the
response validate against the schema.

I suppose you could overload an existing code, like badVerb or
badArgument, but this is not advisable b/c it would like confuse
harvesters.

these aren't really OAI errors per se, they're system errors.  the right
way to handle this is probably to issue http codes of 500 or 503.

regards,

Michael

> 
> On Mon, 24 Jun 2002, Stuart Chalk wrote:
> 
> > > How about for when the database is down, or other low-level
> > > problems?
> > >   I for one would like to use something like:
> > >
> > > <error code="ServerDown">Service unavailable.  Retry in one
> > > hour</error>
> > >
> > >  with a 503 code, but obviously that's not in the protocol.
> >
> > Actually, this is in the protocol
> >
> > >From the v2.0 specficiations document
> >
> > 3.1.2.2 Status-Code
> > OAI-PMH errors are distinguished from HTTP Status-Codes. Since OAI-PMH
> > uses HTTP as a transport layer, servers implementing OAI-PMH must conform
> > to HTTP status code definitions and report relevant HTTP transport layer
> > status via those Status-Codes. OAI-PMH repositories may employ HTTP
> > Status-Codes in addition to "200 OK".For instance, the following
> > Status-Codes may be useful for load balancing in OAI repositories:
> >
> > *	302 - Allows the repository to temporarily redirect an OAI-PMH
> > request to another repository. The URI of the temporary repository should
> > be given by the Location field in the HTTP response.
> > *	503 - Service unavailable, a Retry-After period is specified.
> > Harvesters should wait this period before attempting another OAI-PMH
> > request.
> >
> > Stuart
> >
> > _______________________________________________
> > OAI-implementers mailing list
> > OAI-implementers@oaisrv.nsdl.cornell.edu
> > http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers
> >
> 
> 
> ***********************************************************
>    PGPKey: http://www.cs.utk.edu/~deridder/jd-pgp.txt
> ***********************************************************
> 
> _______________________________________________
> OAI-implementers mailing list
> OAI-implementers@oaisrv.nsdl.cornell.edu
> http://oaisrv.nsdl.cornell.edu/mailman/listinfo/oai-implementers
> 

---
Michael L. Nelson
NASA Langley Research Center		m.l.nelson@larc.nasa.gov
MS 158, Hampton, VA 23681		http://www.ils.unc.edu/~mln/
+1 757 864 8511				+1 757 864 8342 (f)