Skip to content

Commit

Permalink
Element-R: log outgoing HTTP requests (#3127)
Browse files Browse the repository at this point in the history
otherwise it's rather hard to see them, at least in Firefox.
  • Loading branch information
richvdh committed Feb 6, 2023
1 parent 2a36359 commit 8a3d7d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rust-crypto/OutgoingRequestProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ export class OutgoingRequestProcessor {
prefix: "",
};

return await this.http.authedRequest<string>(method, path, queryParams, body, opts);
try {
const response = await this.http.authedRequest<string>(method, path, queryParams, body, opts);
logger.info(`rust-crypto: successfully made HTTP request: ${method} ${path}`);
return response;
} catch (e) {
logger.warn(`rust-crypto: error making HTTP request: ${method} ${path}: ${e}`);
throw e;
}
}
}

0 comments on commit 8a3d7d5

Please sign in to comment.