Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Add handling of 403/500 for `getSessionId`, in [#87](https://github.com/Microsoft/BotFramework-DirectLineJS/pull/87)

## [0.9.16] - 2018-08-14
### Added
Expand Down
12 changes: 9 additions & 3 deletions src/directLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,16 @@ export class DirectLine implements IBotConnection {
}
})
.map(ajaxResponse => {
konsole.log("getSessionId response: " + ajaxResponse.response.sessionId);
return ajaxResponse.response.sessionId as string;
if (ajaxResponse && ajaxResponse.response && ajaxResponse.response.sessionId) {
konsole.log("getSessionId response: " + ajaxResponse.response.sessionId);
return ajaxResponse.response.sessionId as string;
}
return '';
})
.catch(error => {
konsole.log("getSessionId error: " + error.status);
return Observable.of('');
Comment thread
Jeffders marked this conversation as resolved.
})
.catch(error => this.catchPostError(error))
)
.catch(error => this.catchExpiredToken(error));
}
Expand Down