juice-shop / multi-juicer

Host and manage multiple Juice Shop instances for security trainings and Capture The Flags
Apache License 2.0
268 stars 121 forks source link

UI: Improve Feedback for Maximum Instances Limit Reached in Juice-Shop #179

Closed jonasbg closed 11 months ago

jonasbg commented 11 months ago

At present, when the maximum instances limit of Juice-Shop is reached, the user only receives a vague error message: Failed to create / join the team. This message does not effectively inform the user about the actual issue, which is hitting the limit for instances.

The error message could be more informative and user-friendly, for instance: Max instances (35) reached, contact admin or join another team to participate.

In addition, the error code associated with this situation is currently 500, which is not appropriate for this kind of error. It should be revised to a more suitable status code, such as 418.

J12934 commented 11 months ago

What does it show now?

It used to show these errors in the frontend:

"Reached Maximum Instance Count. Find a Admin to handle this." https://github.com/juice-shop/multi-juicer/blob/main/juice-balancer/src/teams/teams.js#L144

I would not want to show the user what the max instance count is configured to, so i think the error message right now is ok but yours definitly is a bit nicer :D So I'm open to chanign it to it (other than the instance count, would leave that out)

J12934 commented 11 months ago
Screenshot 2023-09-23 at 12 39 37

Changed it to show a the error message to the user :) Thank you for the suggestion 🙌