Skip to content

fix: Expand the logging around AggregateError#6664

Merged
CommanderStorm merged 5 commits intolouislam:masterfrom
AnuragEkkati:fix/expand-aggregateerror-6482
Jan 11, 2026
Merged

fix: Expand the logging around AggregateError#6664
CommanderStorm merged 5 commits intolouislam:masterfrom
AnuragEkkati:fix/expand-aggregateerror-6482

Conversation

@AnuragEkkati
Copy link
Copy Markdown
Contributor

📝 Summary of changes done and why they are done

When axios requests fail with an AggregateError, the error logs just show "AggregateError" which provides no useful debugging information.

📋 Related issues

📄 Checklist

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 My code adheres to the style guidelines of this project.
  • ⚠️ My changes generate no new warnings.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.

AI Usage

Cursor AI : GPT-5. Used to generate multiple testcases which can validate if existing functionality is not broken and new desired logging works as expected.

📷 Screenshots or Visual Changes

  • Log Modifications: Logging around AggregateError changed

Before :

Error: Error: AggregateError
    at Slack.throwGeneralAxiosError (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-test/server/notification-providers/notification-provider.js:122:15)
    at Slack.send (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-test/server/notification-providers/slack.js:175:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async Socket.<anonymous> (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-test/server/server.js:1568:27)
Error: Error: AxiosError: Request failed with status code 500 boom
    at Slack.throwGeneralAxiosError (/Users/anurag/workspace/github/uptime-kuma/server/notification-providers/notification-provider.js:122:15)
    at Slack.send (/Users/anurag/workspace/github/uptime-kuma/server/notification-providers/slack.js:175:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async Socket.<anonymous> (/Users/anurag/workspace/github/uptime-kuma/server/server.js:1567:27)

After :

Error: Request failed (code=ECONNREFUSED) - caused by: connect ECONNREFUSED ::1:9999 (code=ECONNREFUSED); connect ECONNREFUSED 127.0.0.1:9999 (code=ECONNREFUSED)
    at Slack.throwGeneralAxiosError (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/notification-providers/notification-provider.js:158:15)
    at Slack.send (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/notification-providers/slack.js:170:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Socket.<anonymous> (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/server.js:1564:27)
Error: Request failed with status code 500 (code=ERR_BAD_RESPONSE) (HTTP 500 Internal Server Error) boom
    at Slack.throwGeneralAxiosError (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/notification-providers/notification-provider.js:158:15)
    at Slack.send (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/notification-providers/slack.js:170:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Socket.<anonymous> (/Users/anurag/workspace/github/uptimekuma/uptime-kuma-agg-error/server/server.js:1564:27)
UI Before After
UI Message Before After

@AnuragEkkati AnuragEkkati changed the title fix(AggregateError Notification) : Expand the logging around AggregateError fix: Expand the logging around AggregateError Jan 10, 2026
Comment thread test/backend-test/notification-providers/test-notification-provider.js Outdated
Comment thread test/backend-test/notification-providers/test-notification-provider.js Outdated
Copy link
Copy Markdown
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I would like to see the testcase be made a bit more understandable, if possible, that is currently not entirely the case

@CommanderStorm CommanderStorm added the pr:please address review comments this PR needs a bit more work to be mergable label Jan 10, 2026
@CommanderStorm CommanderStorm added this to the 2.1.0 milestone Jan 10, 2026
@CommanderStorm CommanderStorm enabled auto-merge (squash) January 11, 2026 00:55
@CommanderStorm CommanderStorm merged commit 0c9354d into louislam:master Jan 11, 2026
36 of 37 checks passed
@CommanderStorm CommanderStorm removed the pr:please address review comments this PR needs a bit more work to be mergable label Jan 11, 2026
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.

AggregateError does not have good support for logging which n errors occurred

2 participants