<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/ControlReply/isSuccess",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor12ControlReplyV9isSuccessSbvp"
  },
  "title" : "isSuccess"
}
-->

# isSuccess

`true` when the status code is in the 2xx range.

```
var isSuccess: Bool { get }
```

## Discussion

Classifies `statusCode` against the HTTP-like convention used
by Tor’s control protocol: 2xx = success, 4xx/5xx = error,
6xx = asynchronous event. Prefer this over direct
`statusCode == 250` comparisons so `251` replies (“command
accepted but operation unnecessary”) aren’t treated as errors.