<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorError/controlProtocolError(code:message:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A5ErrorO015controlProtocolB0yACSi_SStcACmF"
  },
  "title" : "TorError.controlProtocolError(code:message:)"
}
-->

# TorError.controlProtocolError(code:message:)

Tor returned a non-success reply to a control command.

```
case controlProtocolError(code: Int, message: String)
```

## Discussion

The `code` is the three-digit numeric reply code per
control-spec.txt §2.3 ([Replies](https://spec.torproject.org/control-spec/replies.html)):
250/251 = success (never raised here), 510 = unrecognized command,
512 = syntax error in argument, 513 = unrecognized argument, 514 =
auth required, 515 = bad auth, 550 = unspecified Tor error,
552 = unrecognized entity, 553 = invalid config value,
554 = invalid descriptor, 555 = unmanaged entity, 650 = async event
(also not raised here; flows to [`TorEvent`](/documentation/Tor/TorEvent) instead).
`message` carries Tor’s free-form diagnostic text.