Charger commands validation error handling improvement

DateEndpoint
02-03-2026POST /api/chargers/{id}/sendCommand

Summary
Improved validation and error responses when sending commands to chargers that are missing or not in a valid state. Previously, these cases could lead to internal ArgumentNullExceptions and a generic OperationFailedForUnknownReasons error.

New behavior
Instead of returning OperationFailedForUnknownReasons, the endpoint now responds more explicitly:

  • If the charger does not exist (charger == null):
    Returns UnknownObject (aligned with other public charger endpoints).

  • If the charger is deactivated or its deviceId is null/empty:
    Returns UnknownDeviceId.

Impact

  • No changes to successful calls; valid chargers behave as before.
  • For invalid or deactivated chargers, clients now receive clearer, more specific error codes instead of a generic failure reason.