Package sword2 :: Module server_errors
[hide private]
[frames] | no frames]

Module server_errors

source code

Dictionary of SWORD2-specific IRI errors to simple description and expected accompanying HTTP codes.

Functions [hide private]
 
get_error(iri, code=None) source code
Variables [hide private]
  sworderror_l = logging.getLogger(__name__)
  SWORD2ERRORSBYNAME = {'ErrorBadRequest': {'IRI': 'http://purl....
  SWORD2ERRORSBYIRI = {'': {'IRI': '', 'codes': [], 'description...
  __package__ = 'sword2'
  k = 'MethodNotAllowed'
  v = {'IRI': 'http://purl.org/net/sword/error/MethodNotAllowed'...
Variables Details [hide private]

SWORD2ERRORSBYNAME

Value:
{'ErrorBadRequest': {'IRI': 'http://purl.org/net/sword/error/ErrorBadR\
equest',
                     'codes': [400],
                     'description': 'Some parameters sent with the POS\
T were not understood. ',
                     'name': 'ErrorBadRequest'},
 'ErrorChecksumMismatch': {'IRI': 'http://purl.org/net/sword/error/Err\
orChecksumMismatch',
...

SWORD2ERRORSBYIRI

Value:
{'': {'IRI': '',
      'codes': [],
      'description': 'Error IRI is not within the SWORD2 specification\
 and so, is not enumerated by this constant',
      'name': 'UNKNOWNERROR'},
 'http://purl.org/net/sword/error/ErrorBadRequest': {'IRI': 'http://pu\
rl.org/net/sword/error/ErrorBadRequest',
                                                     'codes': [400],
...

v

Value:
{'IRI': 'http://purl.org/net/sword/error/MethodNotAllowed',
 'codes': [405],
 'description': 'Used when the client has attempted one of the HTTP up\
date verbs (POST, PUT, DELETE) but the server has decided not to respo\
nd to such requests on the specified resource at that time. ',
 'name': 'MethodNotAllowed'}