Skip to content

Comments

feat: support AggregateError#69

Merged
gentlementlegen merged 2 commits intoubiquity-os:developmentfrom
ubiquity-whilefoo:aggregate-error
Feb 21, 2025
Merged

feat: support AggregateError#69
gentlementlegen merged 2 commits intoubiquity-os:developmentfrom
ubiquity-whilefoo:aggregate-error

Conversation

@whilefoo
Copy link
Member

@gentlementlegen
Copy link
Member

The problem with aggregate error is that it accepts pretty much anything, so if you push an array of logger errors then it looks like this:

Meniole/plugin-template#1 (comment)

Corresponding code:

  throw new AggregateError([new Error("error 1"), new Error("error 2"), logger.error("logger error"), new RangeError("range error")]);

But I think it would be the logger responsibility to properly handle toString() method so it doesn't display this way.

@gentlementlegen
Copy link
Member

@whilefoo using the same code snippet in mentioned before, I pulled the latest version and now it seems to look like:
Meniole/plugin-template#1 (comment)

Am I missing something? I cleaned lock files and node_modules to be sure, same result.

@whilefoo
Copy link
Member Author

Works for me: ubiquibot-whilefoo-testing/testing#19 (comment)
Did you run sdk:build?

@whilefoo
Copy link
Member Author

@gentlementlegen okay to merge?

@gentlementlegen
Copy link
Member

@whilefoo Oops sorry forgot to test again, will give it another go and merge if it goes well.

@gentlementlegen
Copy link
Member

New QA from my side: Meniole/plugin-template#3 (comment)

Seems to work fine, thank you for the fix and sorry for the delay, might have been some residue in my node_modules files.

@gentlementlegen gentlementlegen merged commit 500351f into ubiquity-os:development Feb 21, 2025
3 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.

Handle error arrays like AggregateError for proper display

2 participants