mirror of
https://github.com/vector-im/element-web.git
synced 2026-07-06 15:30:01 +00:00
Fix "unexpected error" logging when fetching RTC transports from the homeserver
The previous code assumed that the homeserver would return `M_NOT_FOUND` when the endpoint wasn't implemented. But homeservers should return `M_UNRECOGNIZED` instead in this case. See https://spec.matrix.org/v1.18/client-server-api/#:~:text=The%20server%20did%20not%20understand%20the%20request%2E
This commit is contained in:
@@ -62,7 +62,10 @@ export class CallStore extends AsyncStoreWithClient<EmptyObject> {
|
||||
transports.forEach((t) => this.configuredMatrixRTCTransports.add(t));
|
||||
} catch (ex) {
|
||||
// Expected, MSC not implemented.
|
||||
if (ex instanceof MatrixError === false || ex.errcode !== "M_NOT_FOUND") {
|
||||
//
|
||||
// Homeservers will return a 404 M_UNRECOGNIZED matrix error if they
|
||||
// don't implement a requested endpoint.
|
||||
if (ex instanceof MatrixError === false || ex.errcode !== "M_UNRECOGNIZED") {
|
||||
logger.warn("Unexpected error when trying to fetch RTC transports", ex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user