SRU VERSION 1.1 ARCHIVE
Sometimes things go wrong. In these cases the server is obliged to report that something went wrong, by sending a diagnostic record explaining what happened. A list of currently supported diagnostics is available and more may be identified in the future.
Diagnostics fall into two categories, 'fatal' and 'non-fatal'. A fatal diagnostic is one in which the execution of the request cannot procede and no records are available to return. For example, if the client supplied an invalid query there is nothing that the server can do. A non-fatal diagnostic on the other hand is one where processing may be affected but the server can continue. For example if a particular record is not available in the requested schema but others are, the server may return the ones which are available rather than failing the entire request.
Non-fatal diagnostics are also divided into two categories 'surrogate' and 'non-surrogate'. Surrogate diagnostics take the place of a record. For example if the second of three records was not available in the requested schema, then the response would include the first record, a surrogate diagnostic explaining that the second record is not available, and then the final record. Non-surrogate, non-fatal diagnostics are diagnostics saying that while some or all the records are available, something else went wrong. For example the requested sorting algorithm might not be available.
Surrogate diagnostics take the place of the record for which they are a surrogate in the 'records' parameter of the response. Non-surrogate records, both fatal and non-fatal, are returned in the 'diagnostics' parameter.
Diagnostics are returned in a very simple schema which has only three elements, 'uri', 'details' and 'message'. The required 'uri' field is a URI, identifying the particular diagnostic. When the URI begins with "info:srw/diagnostic/1/" (for example, 'info:srw/diagnostic/1/7') then the diagnostic is from the standard SRU diagnostic list. The 'details' part contains information specific to the diagnostic, format as specified by the individual diagnostic definition. The 'message' field contains a human readable message to be displayed. Only the uri field is required, the other two are optional.
It is recommended that whatever the URI path (for example if an extension
needs to define its own diagnostics), the final section should be a distinguishing
integer (for example 'http://srw.cheshire3.org/diagnostics/1')
Schema Element Summary
Non-surrogate, fatal diagnostic:
Surrogate, non-fatal diagnostic:
July 25, 2007