File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
77## [ Unreleased]
8+ ### Changed
9+ - Add handling of 403/500 for ` getSessionId ` , in [ #87 ] ( https://github.com/Microsoft/BotFramework-DirectLineJS/pull/87 )
810
911## [ 0.9.16] - 2018-08-14
1012### Added
Original file line number Diff line number Diff line change @@ -496,10 +496,16 @@ export class DirectLine implements IBotConnection {
496496 }
497497 } )
498498 . map ( ajaxResponse => {
499- konsole . log ( "getSessionId response: " + ajaxResponse . response . sessionId ) ;
500- return ajaxResponse . response . sessionId as string ;
499+ if ( ajaxResponse && ajaxResponse . response && ajaxResponse . response . sessionId ) {
500+ konsole . log ( "getSessionId response: " + ajaxResponse . response . sessionId ) ;
501+ return ajaxResponse . response . sessionId as string ;
502+ }
503+ return '' ;
504+ } )
505+ . catch ( error => {
506+ konsole . log ( "getSessionId error: " + error . status ) ;
507+ return Observable . of ( '' ) ;
501508 } )
502- . catch ( error => this . catchPostError ( error ) )
503509 )
504510 . catch ( error => this . catchExpiredToken ( error ) ) ;
505511 }
You can’t perform that action at this time.
0 commit comments