Skip to content

Commit

Permalink
Merge pull request #4944 from zeeshanakram3/argus_log_parsed_axios_error
Browse files Browse the repository at this point in the history
[Argus] fix: Parse Axios error before logging & exporting to the Elasticsearch
  • Loading branch information
mnaamani authored Oct 24, 2023
2 parents 6c13068 + 8ebd130 commit 2939a86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions distributor-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Include response headers in `http` logs
- Disable open-api express response validation if NODE_ENV is set to 'production' or 'prod'. This should improve response times when serving assets.
- Include `nodeEnv` in `/api/v1/status` response, to help detect mis-configured nodes.
- **FIX** Axios Error Logging: Logging the error, when asset download from storage-node time outs, has been fixed to include the _only_ error message, response, status code and bunch of other fields. Previously, logging error object (which includes axios client instance), failed with `Converting circular structure to JSON` error and causing the distributor-node to crash.

### 1.3.1

Expand Down
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: axios.isAxiosError(err) ? parseAxiosError(err) : err,
})
})

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

0 comments on commit 2939a86

Please sign in to comment.