Skip to content

Log CLI invocation error as is without UnhandledPromiseException - #277

Merged
Sebastian-Webster merged 1 commit into
mainfrom
276-log-error-from-cli-execution-as-is-without-unhandledpromiseexception
Aug 9, 2026
Merged

Log CLI invocation error as is without UnhandledPromiseException#277
Sebastian-Webster merged 1 commit into
mainfrom
276-log-error-from-cli-execution-as-is-without-unhandledpromiseexception

Conversation

@Sebastian-Webster

Copy link
Copy Markdown
Owner

This pull request closes #276

If an error occurred during database creation from the CLI, the error would be inside of an UnhandledPromiseException.

For example: UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Option logLevel must be either undefined or "LOG", "WARN", or "ERROR". | Received value: notaloglevel (type: string)".

By adding a catch to the database creation, any errors will now show up in the console as is, without the UnhandledPromiseException. For example: ERROR: Option logLevel must be either undefined or "LOG", "WARN", or "ERROR". | Received value: notaloglevel (type: string)

This makes the error a lot easier to read.

@Sebastian-Webster Sebastian-Webster self-assigned this Aug 8, 2026
@Sebastian-Webster Sebastian-Webster added the enhancement New feature or request label Aug 8, 2026
@Sebastian-Webster
Sebastian-Webster merged commit b3fa12a into main Aug 9, 2026
438 checks passed
@Sebastian-Webster
Sebastian-Webster deleted the 276-log-error-from-cli-execution-as-is-without-unhandledpromiseexception branch August 9, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log error from CLI execution as is without UnhandledPromiseException

1 participant