getCommsErrorString()
function getCommsErrorString(error: unknown): string | null;
The error_string the API sends alongside error_code, when there was one.
It is a server-authored message rather than a stable contract, so branch on
getCommsErrorCode and use this for display.
Parameters
| Parameter | Type | Description |
|---|---|---|
error | unknown | The thrown value to inspect. |
Returns
string | null
The message, or null when the error is not a
CommsRequestError or carried no string error_string.