Better types for WebAPI
This commit is contained in:
parent
c05d23e628
commit
b9d6497cb1
22 changed files with 156 additions and 107 deletions
|
@ -19,6 +19,7 @@ import { isOlderThan } from './util/timestamp';
|
|||
import { parseRetryAfter } from './util/parseRetryAfter';
|
||||
import { getEnvironment, Environment } from './environment';
|
||||
import { StorageInterface } from './types/Storage.d';
|
||||
import { HTTPError } from './textsecure/Errors';
|
||||
import * as log from './logging/log';
|
||||
|
||||
export type ChallengeResponse = {
|
||||
|
@ -454,8 +455,7 @@ export class ChallengeHandler {
|
|||
await this.options.sendChallengeResponse(data);
|
||||
} catch (error) {
|
||||
if (
|
||||
!(error instanceof Error) ||
|
||||
error.name !== 'HTTPError' ||
|
||||
!(error instanceof HTTPError) ||
|
||||
error.code !== 413 ||
|
||||
!error.responseHeaders
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue