Background Error Handling in CSW was implemented primarily through exceptions Most error conditions in shared code base already identified from CSW experience OpenSearch requires errors to be handled via HTTP status codes, not exceptions HTTP Status codes permit server-supplied text which can be used for human-readable error messages Clients can modify the error text returned from the server for explanation to end users
Request Exception Details CSW Compliance Issues – Invalid XML requests – Invalid GetRecords & GetRecordById CSW requests – Data Validation Issues CWIC Limitations & Conventions – Mandatory dataset ID (GetRecords) – Record ID format (GetRecordById) – Too many records – Unsupported spatial extent – Unsupported temporal range
Remote Communication Strategy Trap remote communication problems Try to fix what it can Inform client of unresolved issue – Request timeout – Remote source unreachable – Unrecognized response from remote source – Configuration issues with connectors Details in CWIC Program Exception Handling document on WGISS/CWIC web site
OpenSearch Status Code Usage 4xx status codes, i.e., client errors – Refer to errors from the CWIC server (Mediator and Connectors) since the CWIC component do the basic syntax checking on incoming requests. A few may be related to internal CWIC server errors. 5xx status codes, i.e., server errors – Refer to problems in connecting to or parsing responses from the remote data provider system, since these exceptions are generally not correctable nor controllable from the CWIC software.
OpenSearch Errors Invalid Request Format (4xx) Search Request Errors (4xx) Request Limitations & Data Validation (4xx) Remote System & Communication Errors (5xx) Other errors - server configuration, NFE, … (5xx)