* @brief Get interface error message if any */
| 326 | * @brief Get interface error message if any |
| 327 | */ |
| 328 | API::CommandResponse API::Handlers::CANBusHandler::getInterfaceError(const QString& id, |
| 329 | const QJsonObject& params) |
| 330 | { |
| 331 | Q_UNUSED(params) |
| 332 | |
| 333 | const QString error = IO::ConnectionManager::instance().canBus()->interfaceError(); |
| 334 | |
| 335 | QJsonObject result; |
| 336 | result[QStringLiteral("hasError")] = !error.isEmpty(); |
| 337 | result[QStringLiteral("error")] = error; |
| 338 | |
| 339 | return CommandResponse::makeSuccess(id, result); |
| 340 | } |
nothing calls this directly
no test coverage detected