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

[Argus] fix: Parse Axios error before logging & exporting to the Elasticsearch #4944

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ export class NetworkingService {
})

objectDownloadQueue.on('error', (err) => {
this.logger.error('Download attempt from storage node failed after availability was confirmed:', { err })
this.logger.error('Download attempt from storage node failed after availability was confirmed:', {
err: parseAxiosError(err),
Copy link
Member

@mnaamani mnaamani Oct 24, 2023

Choose a reason for hiding this comment

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

If err is not an instance of AxiosError will parsing fail?

Perhaps parse only if axios.isAxiosError(err) == true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed here 8ebd130

})
})

objectDownloadQueue.on('end', () => {
Expand Down
Loading