You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’ve identified some issues with the error handling in your code. Currently, the code only handles responses that include an error message: const removeListener = this._addListener(requestId, data => { removeListener(); if (data.errorMessage) { const error = new Error(data.errorMessage); error.data = data.data; reject(error); } else { resolve(data); } });
However, there are cases where the response includes an array of errors that aren't being handled correctly. Could you please update the logic to cover this scenario as well?
The text was updated successfully, but these errors were encountered:
Hi, I’ve identified some issues with the error handling in your code. Currently, the code only handles responses that include an error message:
![image](https://private-user-images.githubusercontent.com/90924638/366762544-3d0c8eeb-58fe-4c8e-8c6b-6b256391caee.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODEzOTMsIm5iZiI6MTczOTM4MTA5MywicGF0aCI6Ii85MDkyNDYzOC8zNjY3NjI1NDQtM2QwYzhlZWItNThmZS00YzhlLThjNmItNmIyNTYzOTFjYWVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE3MjQ1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0YjdhYzY1MmZjZWU1YmExNTIwNWVmNWIyNDY0YzExYWQ0Mzk1MGYzMmFiOTdhMzU0MDZhYzM0YWNjMGVmMGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lLbGwQYz_A1gNa_eZOF22WgcsdWUDEwqJEKf3hMQlCg)
const removeListener = this._addListener(requestId, data => { removeListener(); if (data.errorMessage) { const error = new Error(data.errorMessage); error.data = data.data; reject(error); } else { resolve(data); } });
However, there are cases where the response includes an array of errors that aren't being handled correctly. Could you please update the logic to cover this scenario as well?
The text was updated successfully, but these errors were encountered: