Description
If database connection is failed (such as due to a wrong password), the HTTP request returns unrelated error message.
Steps to Reproduce
Steps to reproduce the bug:
- Use a wrong password for MySQL in application.properties
- Send a register request through Postman
- An unrelated error "duplicate username or email" appears
Expected Behavior
Should give more meaningful error message such as "Database connection failed".
Relevant screenshots
