Makes a 'DefaultCommandError'.
Makes a 'DefaultCommandError'.
The error message.
The original document contained in the response.
The code of the error, if any.
Checks if the given document contains a 'ok' field which value equals 1, and produces a command error if not.
Checks if the given document contains a 'ok' field which value equals 1, and produces a command error if not.
The document of the response.
The optional name of the command.
A function that takes the document of the response and the optional name of the command as arguments, and produces a command error.