dbos-inc / dbos-transact

The Transactional TypeScript Framework
https://docs.dbos.dev
MIT License
278 stars 19 forks source link

check userdb is defined before calling destroy #530

Closed maxdml closed 6 days ago

maxdml commented 6 days ago

I noticed an exception being thrown when loading classes fail. See:

Screenshot 2024-07-01 at 09 31 55

When initializing the dbos runtime, we first construct the class, then load the applications classes through entry points, then call init(). Failure to load the class results in an undefined user database, which in turn results in an exception being throw. The exception pollutes the output and degrades UX.