diff --git a/src/my_request.ts b/src/my_request.ts index 8c9d7fd..590c5c8 100644 --- a/src/my_request.ts +++ b/src/my_request.ts @@ -51,6 +51,7 @@ function startSession(config: IConfig): Promise }) .then((response: any) => { + if ((response.data === undefined) || (response.data.session_id === undefined)) throw new Error('Getting session failed: ' + JSON.stringify(response)); return response.data.session_id; }); }