Right now the subtype of VriRecordsResponse, RequestRejectionhas three attributes: AdditionalDetails, Error, and OtherError. Since all these errors are at the same "level", it is very difficult to contextualize errors that are specific to a certain part of the request payload. For example, assume that there is a requirement that the voter's party must be be defined. Right now the response would need to look something like this:
What you end up with is a lot of duplicative error codes with the difference between them being the target of the error rather than the kind.
Proposed Changes
Add an attribute called Ref that would serve as a pointer to the target node(s). The pointer language used would be dependent on the transmission format used (e.g. XPath for XML, JSON Pointer for JSON).
Move attribute from (1), Error and OtherError to a composed class Error off of RequestRejection (see image below).
Then we would end up expressing the earlier example as such:
Right now the subtype of
VriRecordsResponse
,RequestRejection
has three attributes:AdditionalDetails
,Error
, andOtherError
. Since all these errors are at the same "level", it is very difficult to contextualize errors that are specific to a certain part of the request payload. For example, assume that there is a requirement that the voter's party must be be defined. Right now the response would need to look something like this:What you end up with is a lot of duplicative error codes with the difference between them being the target of the error rather than the kind.
Proposed Changes
Ref
that would serve as a pointer to the target node(s). The pointer language used would be dependent on the transmission format used (e.g. XPath for XML, JSON Pointer for JSON).Error
andOtherError
to a composed classError
off ofRequestRejection
(see image below).Then we would end up expressing the earlier example as such:
Remove the following enumeration literals from
RequestError
incomplete-address
incomplete-birth-date
incomplete-name
incomplete-signature
Perhaps, some new, more general RequestError enumeration values could be developed as well.