diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index d50cbca5..c3b91e3b 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -101,10 +101,6 @@ export class Registration { else { throw new Error("This stage could not be completed!"); } - case 400: - default: - const error = "error" in response? response.error: "Could not parse response"; - throw new Error(error); } } diff --git a/src/matrix/registration/types.ts b/src/matrix/registration/types.ts index 77d051af..f1ddbe98 100644 --- a/src/matrix/registration/types.ts +++ b/src/matrix/registration/types.ts @@ -21,7 +21,7 @@ export type AccountDetails = { inhibitLogin: boolean; } -export type RegistrationResponse = RegistrationResponseMoreDataNeeded | RegistrationResponseError | RegistrationResponseSuccess; +export type RegistrationResponse = RegistrationResponseMoreDataNeeded | RegistrationResponseSuccess; export type RegistrationResponseMoreDataNeeded = { completed?: string[]; @@ -31,12 +31,6 @@ export type RegistrationResponseMoreDataNeeded = { status: 401; } -type RegistrationResponseError = { - errcode: string; - error: string; - status: 400; -} - export type RegistrationResponseSuccess = { user_id: string; device_id: string;