webex / webex-js-sdk

JavaScript SDK for Webex
https://webex.github.io/webex-js-sdk/
Other
170 stars 336 forks source link

fix: improved logging of errors #3570

Closed marcin-bazyl closed 2 months ago

marcin-bazyl commented 2 months ago

This pull request addresses

Some errors were not logged correctly and only showed up as "{}"

by making the following changes

errors don't have any enumerable properties so need special handling by the logger, because JSON.stringify() doesn't work on them. The special handling was done for WebexHttpError, but sometimes we have other errors thrown in the code, so changed the condition to check for Error (WebexHttpError extends Error).

Change Type

The following scenarios where tested

unit tests

I certified that


Make sure to have followed the contributing guidelines before submitting.

aws-amplify-us-east-2[bot] commented 2 months ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3570.d3m3l2kee0btzx.amplifyapp.com