From e8c480426ae9bf92ac7a946e48a1206c7e457640 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 4 Feb 2022 16:37:43 +0530 Subject: [PATCH] Remove error code --- src/matrix/registration/Registration.ts | 4 ---- src/matrix/registration/types.ts | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) 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;