Element-R: log outgoing HTTP requests (#3127)

otherwise it's rather hard to see them, at least in Firefox.
This commit is contained in:
Richard van der Hoff
2023-02-06 10:50:05 +00:00
committed by GitHub
parent 2a363598dd
commit 8a3d7d5671
+8 -1
View File
@@ -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;
}
}
}