File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
libraries/botbuilder-dialogs Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ export class OAuthPrompt extends Dialog {
264264 private async sendOAuthCardAsync ( context : TurnContext , prompt ?: string | Partial < Activity > ) : Promise < void > {
265265 // Validate adapter type
266266 if ( ! ( 'getUserToken' in context . adapter ) ) {
267- throw new Error ( `OAuthPrompt.prompt (): not supported for the current adapter.` ) ;
267+ throw new Error ( `OAuthPrompt.sendOAuthCardAsync (): not supported for the current adapter.` ) ;
268268 }
269269
270270 // Initialize outgoing message
@@ -364,8 +364,8 @@ export class OAuthPrompt extends Dialog {
364364 // Token Exchange not supported in the adapter
365365 await context . sendActivity ( this . getTokenExchangeInvokeResponse (
366366 StatusCodes . BAD_GATEWAY ,
367- 'The bot\'s BotAdapter does not support token exchange operations. Ensure the bot\'s Adapter supports the ITokenExchangeProvider interface.' ) ) ;
368- throw new Error ( 'OAuthPrompt.recognize (): not supported by the current adapter' ) ;
367+ 'The bot\'s BotAdapter does not support token exchange operations. Ensure the bot\'s Adapter supports the ExtendedUserTokenProvider interface.' ) ) ;
368+ throw new Error ( 'OAuthPrompt.recognizeToken (): not supported by the current adapter' ) ;
369369 } else {
370370 // No errors. Proceed with token exchange
371371 const extendedUserTokenProvider : ExtendedUserTokenProvider = context . adapter as ExtendedUserTokenProvider ;
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ describe('OAuthPrompt', function() {
319319 try {
320320 await prompt . sendOAuthCardAsync ( context ) ;
321321 } catch ( e ) {
322- assert . strictEqual ( e . message , `OAuthPrompt.prompt (): not supported for the current adapter.` ) ;
322+ assert . strictEqual ( e . message , `OAuthPrompt.sendOAuthCardAsync (): not supported for the current adapter.` ) ;
323323 }
324324 } ) ;
325325
You can’t perform that action at this time.
0 commit comments