The attributes that can be sent in reply to a message are as follows:
- res
- A string that's identical to the value of the msg
attribute of the message this is a response to.
- id
- A string that is identical to the value of the id attribute
of the message this is a response to.
- dat
- Other data that is associated with the response. This attribute is optional.
The dat attribute is frequently JSON-encoded because there
is often a need to encode more than a simple string.
- err
- If present, this indicates that the request failed. It should be the number of
the error as defined in errno.h. For example, for EBUSY
you would put 16 in this field.
- errstr
- An optional string that could contain further explanation of the error or
debugging information. For example, a more verbose explanation might be
required for an error resulting from a request that includes a SQL
statement, since errors might occur for diverse reasons.