gristlabs_grist-core/test/server
Dmitry S 4d9bbf6263 (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients.
Summary:
- Node has a strong recommendation to assume bad state and exit promptly on
  unhandled exceptions and rejections. We follow it, and only make an effort to
  clean up before exiting, and to log the error in a more standard way.

- The only case seen in recent month of an unhandled rejection was for
  attempting to write overly large JSON to a Client websocket. Ensure that's
  handled, and add a test case that artificially reproduces this scenario.

Test Plan:
Added a test case for failing write to Client, and a test case that unhandled
errors indeed kill the server but with an attempt at cleanup.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4124
2023-12-01 09:42:00 -05:00
..
lib (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
utils (core) sanitizing redis errors 2023-06-06 10:51:17 +02:00
Comm.ts (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
customUtil.ts (core) Update dependencies 2023-10-11 17:36:58 -04:00
docTools.ts (core) Porting the AI evaluation script 2023-03-15 14:54:28 +01:00
generateInitialDocSql.ts update comment 2023-01-17 15:59:09 -05:00
gristClient.ts (core) control the distribution of attachment metadata 2022-12-22 09:10:30 -05:00
tcpForwarder.ts (core) Add options to /status health-check endpoints to check DB and Redis liveness. 2023-10-02 14:41:04 -04:00
testUtils.ts (core) Remove transform columns on shutdown 2023-11-14 22:31:34 +02:00
wait.ts (core) Add timeouts to prevent ActiveDoc bad state during shutdown. 2023-09-26 15:32:49 -04:00