API reference / Common / Engine types / StartError
Type Alias: StartError
ts
type StartError =
| {
code: "invalidLicense";
detail: {
reason: string;
};
}
| {
code: "permitRefused";
detail: {
message: string;
};
}
| {
code: "cannotVerify";
detail: {
detail: string;
};
};Why a session could not be started.
Three variants because there are three things a person can be told, and no more: the key is bad, the permit server said no, or we could not check. Every finer distinction — which claim failed, why the server declined, which step of the verification — is detail on the variant and text in the console, not another case for a host to switch on.
Thrown as a UDocError whose code is the variant and whose detail is its fields.