From f7b981d4f224d377f7c19dd97cef6ee9cfef558c Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 20 Oct 2023 15:33:08 +0200 Subject: [PATCH] cleaning --- src/rust-crypto/OutgoingRequestProcessor.ts | 4 ++-- src/rust-crypto/RequestSender.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rust-crypto/OutgoingRequestProcessor.ts b/src/rust-crypto/OutgoingRequestProcessor.ts index b369bff6c3c..a890b52b3c4 100644 --- a/src/rust-crypto/OutgoingRequestProcessor.ts +++ b/src/rust-crypto/OutgoingRequestProcessor.ts @@ -62,7 +62,7 @@ export class OutgoingRequestProcessor { * This will send them all off, and mark them as sent in the olm machine. * If some requests fail, they will be retried on the next sync, and a log will describe the failure. * - * @param requests + * @param requests - The outgoing requests to process. */ public async processOutgoingRequests(requests: OutgoingRequest[]): Promise { await Promise.all( @@ -88,7 +88,7 @@ export class OutgoingRequestProcessor { * * @param request - The request to send. * @returns the response body as a string. - * @throws {Error} if the request fails. + * @throws if the request fails. */ public async sendOutgoingRequest(request: OutgoingRequest): Promise { const { id, type } = request; diff --git a/src/rust-crypto/RequestSender.ts b/src/rust-crypto/RequestSender.ts index 2ade6d8a42d..19aa8da6600 100644 --- a/src/rust-crypto/RequestSender.ts +++ b/src/rust-crypto/RequestSender.ts @@ -33,8 +33,8 @@ export class RequestSender { * Creates an HTTP request for the given SDK request object and optional UIA callback. * The method and path of the HTTP request is determined based on the type of the SDK request object. * - * @param request The SDK request object to create an HTTP request for. - * @param uiaCallback An optional UIA callback to use for interactive authentication. + * @param request - The SDK request object to create an HTTP request for. + * @param uiaCallback - An optional UIA callback to use for interactive authentication. * @returns A promise that resolves with the HTTP response body as a string. */ public async createHttpRequest(request: SdkRequest, uiaCallback?: UIAuthCallback): Promise { @@ -76,7 +76,7 @@ export class RequestSender { uiaCallback, ); } else { - respPromise = Promise.reject("Invalid request type"); + respPromise = Promise.reject(new Error("Invalid request type")); } return respPromise;