Conform more of the codebase to strict types (#11191)
This commit is contained in:
parent
4044c2aa66
commit
8107f1d271
25 changed files with 88 additions and 57 deletions
|
@ -178,7 +178,7 @@ export default class MultiInviter {
|
|||
} catch (err) {
|
||||
// The error handling during the invitation process covers any API.
|
||||
// Some errors must to me mapped from profile API errors to more specific ones to avoid collisions.
|
||||
switch (err.errcode) {
|
||||
switch (err instanceof MatrixError ? err.errcode : err) {
|
||||
case "M_FORBIDDEN":
|
||||
throw new MatrixError({ errcode: "M_PROFILE_UNDISCLOSED" });
|
||||
case "M_NOT_FOUND":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue