Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: log additionally axios error #6

Merged
merged 2 commits into from
Jan 14, 2021

Conversation

vyancharuk
Copy link
Contributor

@vyancharuk vyancharuk commented Jan 14, 2021

In case of axios request error extract only necessary props and log them according to https://github.com/axios/axios#handling-errors

It will log something like this:

Screen Shot 2021-01-14 at 00 58 05

@@ -60,6 +97,10 @@ module.exports = function ResponseBuilder() {
* @private
*/
self._errorResponse = (error, codeOverride, req) => {
if (error.isAxiosError) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if error is defined, just in case there is a null thrown. error?.isAxiosError

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added check for null

@vyancharuk vyancharuk merged commit 8249571 into master Jan 14, 2021
@voiceflow-dev
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants