GregoryCannon / TetrisTrainer

A web-based tetris client that allows you to enter custom piece sets to practice builds.
46 stars 9 forks source link

Unexpected behavior: Unhelpful error messages when requesting JSON for levels not supported by the backend #31

Closed parkero closed 1 year ago

parkero commented 2 years ago

Recreation:

  1. Set level as 15 at beginning screen
  2. Start the game
  3. Click "Calculate"

Expected:

The game should let one know the level they have chosen is not supported by the back end.

Actual:

The game returns a cryptic error message

Potential Fix:

A helpful error message exists in the json request response, displayed below. If the json parse fails, then the error could be set to the plain text of the response.

GregoryCannon commented 1 year ago

Fixed with the latest commit! https://github.com/GregoryCannon/TetrisTrainer/commit/471e656e0020f737ce7a348ea2ada1ec37c02554

GregoryCannon commented 1 year ago

(Now all lower-level requests will request the 18 placement)