gristlabs_grist-core/test/server/lib/helpers
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
..
PrepareDatabase.ts (core) Proxy Agent moved to the separate file, Triggers are using proxy now to perform fetch 2023-05-08 11:54:09 +02:00
PrepareFilesystemDirectoryForTests.ts (core) Proxy Agent moved to the separate file, Triggers are using proxy now to perform fetch 2023-05-08 11:54:09 +02:00
Signal.ts (core) Proxy Agent moved to the separate file, Triggers are using proxy now to perform fetch 2023-05-08 11:54:09 +02:00
TestProxyServer.ts (core) Update dependencies 2023-10-11 17:36:58 -04:00
TestServer.ts (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00