dataone Exception definition and implementation requires clarification
The documentation describes the properties and serialization of DataONE exceptions:
However, the definition in the schema:
differs, and so presents an inconsistent reference for implementations.
The Java code appears to follow the documentation, however the python implementation uses the schema to generate exception messages, and so follows the schema definition.
The schema and python code need to be updated to reflect the description in the documentation. Also, all implementations of MN and client software need to be informed of the issue and how they may be impacted.
#7 Updated by Rob Nahf about 6 years ago
I think because the embedded schema file in the documentation (working link: http://jenkins-1.dataone.org/documentation/unstable/API-Documentation-development/apis/Exceptions) used the field 'identifier' instead of 'pid' which is used in the html table to name the field, (yet had the new 'nodeId' field, too) the schema that became the 1.1.0 error schema inadvertently changed the 'pid' field to 'identifier', breaking backwards compatibility.
the 'pid' field is optional, and only used with error responses to cn.resolve, and mn.synchronizationFailed calls.
Metacat's MNodeService.synchronizationFailed implementation does check the pid field. If null, a ServiceFailure is returned to the caller. As far as I could tell, Metacat does not call cn.resolve and attempt to extract the value of the 'pid' field.
Because cn.resolves handles SIDs as of v2, maybe the field 'identifier' is most appropriate name for that field, moving forward. (Or synchronization can populate the 'pid' field, and the 'identifier' field is populated by cn.resolve(), and both fields are defined...)