(core) Miscellaneous little logging improvements

Summary:
1. Log errors in `ActiveDoc.loadDoc` as errors, not just warnings, except for a common 'Cannot create fork' error caused by deployment tests.

2. Log the method name that had an error in `server/lib/Client.ts`.

Discussion: https://grist.slack.com/archives/CR8HZ4P9V/p1652364998893169

Following up on https://phab.getgrist.com/D3522

Test Plan: tested manually, particularly by running the nbrowser/Fork test that led to the initial noisy errors in Slack.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3525
This commit is contained in:
Alex Hall
2022-07-15 00:19:18 +02:00
parent 333ed863f4
commit 1a6e1872de
4 changed files with 14 additions and 10 deletions

View File

@@ -456,7 +456,8 @@ export class Client {
(typeof code === 'string' && code.startsWith('AUTH_NO'))
);
this._log.warn(null, "Error %s %s", skipStack ? err : err.stack, code || '');
this._log.warn(null, "Responding to method %s with error: %s %s",
request.method, skipStack ? err : err.stack, code || '');
response = {reqId: request.reqId, error: err.message};
if (err.code) {
response.errorCode = err.code;