Throw if endpoind is not provided
This commit is contained in:
parent
45360abc87
commit
16ee48b1ad
|
@ -105,6 +105,9 @@ export class Connection {
|
|||
_rpcRequest: RpcRequest;
|
||||
|
||||
constructor(endpoint: string) {
|
||||
if (typeof endpoint !== 'string') {
|
||||
throw new Error('Connection endpoint not specified');
|
||||
}
|
||||
this._rpcRequest = createRpcRequest(endpoint);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue