Log unknown field tags for sync messages we havent handled

This commit is contained in:
Jamie Kyle 2023-04-05 18:05:04 -07:00 committed by GitHub
parent a7a058bb73
commit f1a632263a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 1 deletions

View file

@ -123,6 +123,7 @@ import { getStoriesBlocked } from '../util/stories';
import { isNotNil } from '../util/isNotNil';
import { chunk } from '../util/iterables';
import { isOlderThan } from '../util/timestamp';
import { inspectUnknownFieldTags } from '../util/inspectProtobufs';
const GROUPV1_ID_LENGTH = 16;
const GROUPV2_ID_LENGTH = 32;
@ -3068,8 +3069,10 @@ export default class MessageReceiver
}
this.removeFromCache(envelope);
const envelopeId = getEnvelopeId(envelope);
const unknownFieldTags = inspectUnknownFieldTags(syncMessage).join(',');
log.warn(
`handleSyncMessage/${getEnvelopeId(envelope)}: Got empty SyncMessage`
`handleSyncMessage/${envelopeId}: Got unknown SyncMessage (Unknown field tags: ${unknownFieldTags})`
);
}