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:
Andrew Morgan
2026-06-09 14:36:31 +01:00
parent fa0b88ca9f
commit 62c14560e5
+4 -1
View File
@@ -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);
}
}