killbill / killbill-admin-ui

Kill Bill Administrative UI engine
https://killbill.io
MIT License
52 stars 60 forks source link

Make the Kaui Sign In Page Error 500 more informative #330

Closed KBbitsP closed 4 months ago

KBbitsP commented 1 year ago

Description : In the cases when there is some issue with Kaui login and it encounters error 500, the browser just shows "We're sorry, but something went wrong."

Requirement : To make the error page to display more information about the actual error.

image

tungleduyxyz commented 1 year ago

Hi @pierre, I see this is our default 500 error page.

pierre commented 1 year ago

I can override this but do you have any specific requirements for this page or maybe a design template?

Could you do something simple for now, e.g. just show a box with the raw error details (with stacktrace if available)?

image

I think we should handle the exceptions when login, in case it's 5xx error, we should only display the error message like "Unable to login, please try again." instead of displaying an error page.

Yes, whenever it's possible and we understand the error, let's use flash messages and/or show something very helpful/user friendly.

tungleduyxyz commented 1 year ago

Hi @pierre I found that the environment in this ticket was Docker, and with docker we run the applications as production environment. That's why the app hides the raw error. Here are the configs of the production and development environment: Development: https://github.com/killbill/killbill-admin-ui-standalone/blob/d563498ddc36b9841d32fc025b2c57a87705ffea/config/environments/development.rb#L18 Production: https://github.com/killbill/killbill-admin-ui-standalone/blob/d563498ddc36b9841d32fc025b2c57a87705ffea/config/environments/production.rb#L16C25-L16C25

The difference when the config is on/off:

image image
tungleduyxyz commented 1 year ago

I suggest that we can use another environment variable like DOCKER_DEVELOPMENT_MODE=true. And using this variable to set config.consider_all_requests_local true or false

KBbitsP commented 1 year ago

Hi @tungleduyxyz I believe I was using tomcat deployment for reproducing the error shown in the first comment.

KBbitsP commented 4 months ago

Test Results :

Wrong DB password :

image (9)

Database down :

image (10)

Kill Bill server down :

image (11)