killbill-admin-ui icon indicating copy to clipboard operation
killbill-admin-ui copied to clipboard

Make the Kaui Sign In Page Error 500 more informative

Open KBbitsP opened this issue 3 years ago • 5 comments

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

KBbitsP avatar Dec 19 '22 17:12 KBbitsP

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

  • I can override this but do you have any specific requirements for this page or maybe a design template?
  • 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.

tungleduyxyz avatar Jun 18 '23 03:06 tungleduyxyz

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.

pierre avatar Jun 18 '23 13:06 pierre

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 avatar Jul 16 '23 16:07 tungleduyxyz

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

tungleduyxyz avatar Jul 16 '23 16:07 tungleduyxyz

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

KBbitsP avatar Jul 17 '23 17:07 KBbitsP

Test Results :

Wrong DB password :

image (9)

Database down :

image (10)

Kill Bill server down :

image (11)

KBbitsP avatar Jun 13 '24 17:06 KBbitsP