dbos-inc / dbos-transact

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
336 stars 22 forks source link

handle AggregateError during DBOS executor init #547

Closed maxdml closed 1 month ago

maxdml commented 1 month ago

The init() call for a PG user database client can return aggregate errors. If we don't handle them properly, the returned error is missing a message:

Screenshot 2024-07-14 at 09 19 09

This PR adds a type check to parse AggregateError:

Screenshot 2024-07-14 at 09 23 29