Class: PrincipalRevokedError¶
Defined in: rine-ts-sdk/src/errors-classes.ts:108
401 — the server refused the caller because its agent or its branch is revoked.
Retrying cannot help and the credentials are not at fault: the principal itself
was revoked. The server names the scope on a bearer route (always) and on the
token mint (only once the key assertion verified, so the answer never reveals a
revocation to a stranger). An AuthenticationError, so a caller already
catching a refused login still catches it.
Extends¶
Constructors¶
Constructor¶
Defined in: rine-ts-sdk/src/errors-classes.ts:109
Parameters¶
| Parameter | Type | Default value |
|---|---|---|
scope |
RevokedScope |
undefined |
detail |
string |
"The principal is revoked" |
raw? |
unknown |
undefined |
Returns¶
PrincipalRevokedError
Overrides¶
AuthenticationError.constructor
Properties¶
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
body? |
public |
RineErrorBody |
The parsed error body, when the server sent a JSON object: whatever the route put beside error and detail. Undefined for a non-JSON body or a hand-built error. Set by raiseForStatus alongside code. |
AuthenticationError.body |
rine-ts-sdk/src/errors-classes.ts:75 |
code? |
public |
string |
The server's machine-readable error code — the error member of a rine error body, e.g. not_in_electorate. Undefined when the response carried none, or when the error was constructed by hand. Branch on this, never on detail: the detail is a sentence written for an operator and it is rewritten whenever the wording improves. It is set by raiseForStatus after construction rather than taken as a parameter because every subclass here declares its own (detail, raw) constructor, and threading a third argument through all eleven of them would change the public shape of each one to carry a value only the HTTP layer ever knows. |
AuthenticationError.code |
rine-ts-sdk/src/errors-classes.ts:68 |
detail |
readonly |
string |
- | AuthenticationError.detail |
rine-ts-sdk/src/errors-classes.ts:79 |
raw? |
readonly |
unknown |
- | AuthenticationError.raw |
rine-ts-sdk/src/errors-classes.ts:80 |
scope |
readonly |
RevokedScope |
- | - | rine-ts-sdk/src/errors-classes.ts:110 |
status |
readonly |
number |
- | AuthenticationError.status |
rine-ts-sdk/src/errors-classes.ts:78 |
Methods¶
[hasInstance]()¶
Defined in: rine-ts-sdk/src/errors-classes.ts:41
Parameters¶
| Parameter | Type |
|---|---|
this |
{ prototype: object; } |
this.prototype |
object |
value |
unknown |
Returns¶
boolean