Internal
Should not be instantiated by the user.
Readonly
commandThe command object. Equal to the response body of the HTTP request.
Note that this is the actual raw command object; it's not necessarily 1:1 with methods called on the collection/db.
{
insertOne: { document: { name: 'John' } }
}
Readonly
commandThe command name.
This is the key of the command object. For example, if the command object is
{ insertOne: { document: { name: 'John' } } }
, the command name is insertOne
.
Readonly
durationThe duration of the command, in milliseconds.
Readonly
errorThe error that caused the command to fail.
Typically, some DataAPIError, commonly a DataAPIResponseError or one of its subclasses.
Readonly
keyspaceThe keyspace the command is being run in.
Readonly
nameThe name of the event.
Optional
Readonly
sourceThe table/collection the command is being run on, if applicable.
Readonly
urlThe URL the command is being sent to.
Protected
_descStatic
formatted
Emitted when a command has errored.
Note that these emit real commands, not any abstracted commands like "insertMany" or "updateMany", which may be split into multiple of those commands under the hood.
See CommandEvent for more information about all the common properties available on this event.