Check if the we got proper information about the session,

else die with a lot of suffers!
This commit is contained in:
Godzil 2018-08-01 00:50:38 +01:00
parent da3a51991c
commit a582b15103

View File

@ -51,6 +51,7 @@ function startSession(config: IConfig): Promise<string>
})
.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;
});
}