bug: Errors that happen during tenant initialization are not logged to console #5807
Open
2 of 4 tasks
Labels
enhancement
Make it better
Describe the bug
Errors that happen during tenant initialization are not reported on stdout.
Expected behavior
Whenever an error happens in the application, it should be printed to
stdout
to give system admins actionable information on what went wrong and how it might be fixed.How to reproduce?
logto_tenant_logto_admin
user (e.g. change password)The console only returns "Internal server error" with status code 500. No error information is printed to stdout.
Context
Additional Info:
I discovered this bug today while trying to migrate the database used by logto to a new cluster.
After starting logto with the new Database, the console only returned "Internal Server Error" and no error message was visible in the container logs.
In the end, I had to roll back the migration because I couldn't figure out what was wrong.
Later, I cloned the repo and started adding additional error logging in various places to try and figure out what the actual error was.
In the end, adding
consoleLog.error(error)
to thecallback in
init.ts
provided me with the hidden error message. With this additional line, my stdout now isIf I had the information during my initial migration, it would be simple to fix, but without the error info, i had to roll everything back after ~2h of trying various random things.
The text was updated successfully, but these errors were encountered: