# MongoDB\Driver\Monitoring\CommandFailedEvent::getServer

(mongodb >=1.3.0)

MongoDB\Driver\Monitoring\CommandFailedEvent::getServer — Returns the Server on which the command was executed

### Descripción

final public MongoDB\Driver\Monitoring\CommandFailedEvent::getServer(): MongoDB\Driver\Server

Returns the MongoDB\Driver\Server on which the command was executed.

### Parámetros

Esta función no tiene parámetros.

### Valores devueltos

Returns the MongoDB\Driver\Server on which the command was executed.

### Errores/Excepciones

- Lanza una MongoDB\Driver\Exception\InvalidArgumentException en errores de análisis de argumentos.

### Ver también

- MongoDB\Driver\Monitoring\CommandStartedEvent::getServer() - Returns the Server on which the command was executed
- Application Performance Monitoring (APM)