# isHubUnauthorized

<!-- https://uncage.vercel.app/docs/api/agent/functions/ishubunauthorized/ -->

```ts
function isHubUnauthorized(body): boolean;
```

Defined in: agent/src/transport/types.ts:85

Whether an error body (`{ error: { code } }`, JSON text or parsed) is the hub's own "unknown or
revoked machine token". Only that 401 means revoked: a 401 from a proxy or a deployment
protection page in front of the site (Vercel, Cloudflare Access) is retried.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `body` | `unknown` |

## Returns

`boolean`
