ms-rest-js icon indicating copy to clipboard operation
ms-rest-js copied to clipboard

`RestError` class no longer matches the instance thrown via `botbuilder` message sends

Open Hyokune opened this issue 1 year ago • 1 comments

Package Version: 2.7.0

  • [ ] nodejs
    • nodejs version: 20
    • os name/version: Linux / macOS
  • [ ] browser
    • name/version: N/A

Describe the bug We are currently using the botbuilder to send message via Microsoft Teams however we are checking the instance of the error to match the RestError provided from here to ensure that we are handling known exceptions from the API.

This seems to have been working fine until this week where the thrown error no longer matches the instance.

To Reproduce Steps to reproduce the behavior:

  1. Setup CloudAdapter from botbuilder
  2. Send a message to a user who has blocked the MS teams bot, using continueConversationAsync from the adapter
  3. Check the error thrown

Expected behavior The RestError class instance should match the error thrown via the Rest API

Hyokune avatar Aug 01 '24 21:08 Hyokune

@Hyokune Seems that botbuilder migrated to use @azure/core-http. Could you try using RestError from @azure/core-http instead?

jeremymeng avatar Aug 07 '24 01:08 jeremymeng