Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Oct 20, 2023
1 parent cab7a95 commit f7b981d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/rust-crypto/OutgoingRequestProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
await Promise.all(
Expand 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<string> {
const { id, type } = request;
Expand Down
6 changes: 3 additions & 3 deletions src/rust-crypto/RequestSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(request: SdkRequest, uiaCallback?: UIAuthCallback<T>): Promise<string> {
Expand Down Expand Up @@ -76,7 +76,7 @@ export class RequestSender {
uiaCallback,
);
} else {
respPromise = Promise.reject("Invalid request type");
respPromise = Promise.reject(new Error("Invalid request type"));

Check failure on line 79 in src/rust-crypto/RequestSender.ts

View workflow job for this annotation

GitHub Actions / Jest [unit] (Node 18)

OutgoingRequestProcessor › does not explode with unknown requests

Invalid request type at RequestSender.createHttpRequest (src/rust-crypto/RequestSender.ts:79:42) at OutgoingRequestProcessor.createHttpRequest [as sendOutgoingRequest] (src/rust-crypto/OutgoingRequestProcessor.ts:95:47) at Object.sendOutgoingRequest (spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts:220:23)

Check failure on line 79 in src/rust-crypto/RequestSender.ts

View workflow job for this annotation

GitHub Actions / Jest [unit] (Node latest)

OutgoingRequestProcessor › does not explode with unknown requests

Invalid request type at RequestSender.createHttpRequest (src/rust-crypto/RequestSender.ts:79:42) at OutgoingRequestProcessor.createHttpRequest [as sendOutgoingRequest] (src/rust-crypto/OutgoingRequestProcessor.ts:95:47) at Object.sendOutgoingRequest (spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts:220:23)
}

return respPromise;
Expand Down

0 comments on commit f7b981d

Please sign in to comment.