Better types for WebAPI
This commit is contained in:
parent
c05d23e628
commit
b9d6497cb1
22 changed files with 156 additions and 107 deletions
|
@ -63,6 +63,7 @@ import { IncomingWebSocketRequest } from './WebsocketResources';
|
|||
import { ContactBuffer, GroupBuffer } from './ContactsParser';
|
||||
import type { WebAPIType } from './WebAPI';
|
||||
import type { Storage } from './Storage';
|
||||
import { WarnOnlyError } from './Errors';
|
||||
import * as Bytes from '../Bytes';
|
||||
import {
|
||||
ProcessedDataMessage,
|
||||
|
@ -922,7 +923,7 @@ export default class MessageReceiver
|
|||
':',
|
||||
Errors.toLogFormat(error),
|
||||
];
|
||||
if (error.warn) {
|
||||
if (error instanceof WarnOnlyError) {
|
||||
log.warn(...args);
|
||||
} else {
|
||||
log.error(...args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue