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

Conversation

zeeshanakram3
Copy link
Contributor

Problem

Thanks to @kdembler for investigation

it seems that full axios client is logged with error and we are trying to serialize it including buffers for sending to elastic
which fails because of circular reference

Copy link
Member

@kdembler kdembler left a comment

Choose a reason for hiding this comment

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

LGTM 🫡

@@ -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

@mnaamani mnaamani self-requested a review October 24, 2023 08:40
@mnaamani mnaamani merged commit 2939a86 into Joystream:master Oct 24, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants