Throw if endpoind is not provided

This commit is contained in:
Michael Vines 2018-08-23 19:47:00 -07:00
parent 45360abc87
commit 16ee48b1ad
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}