morko / haxroomie

Haxroomie is an API and CLI to run headless HaxBall rooms without GUI.
17 stars 14 forks source link

crazy error logging #37

Closed morko closed 5 years ago

morko commented 5 years ago

The logging currently is a bit too much. E.g. it is not really necessary to print the error stack when user tries to use an invalid command. RoomController probably should not log the errors because it is already sending events that contain the errors so they can be handled on "client side".

morko commented 5 years ago

If the haxball headless page is unreachable user gets this nice mess and still gets prompted for a token:

STARTING ROOM priv
priv> 2019-06-23 16:03:58 [error]: waiting for function failed: timeout 30000ms exceeded {
  "name": "TimeoutError"
}
ROOM NOT STARTED priv: Could not load the HaxBall headless page!
Get tokens from https://www.haxball.com/headlesstoken
Enter token for priv (c to cancel):