From 6eec2ceeebabe385b74fa5c6c7183919e82e4e0d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 3 Oct 2023 11:01:16 +0100 Subject: [PATCH] Export AutoDiscoveryError and fix type of ALL_ERRORS (#3768) --- src/autodiscovery.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/autodiscovery.ts b/src/autodiscovery.ts index a1ce6c09a..e2f664ed7 100644 --- a/src/autodiscovery.ts +++ b/src/autodiscovery.ts @@ -41,7 +41,7 @@ export enum AutoDiscoveryAction { FAIL_ERROR = "FAIL_ERROR", } -enum AutoDiscoveryError { +export enum AutoDiscoveryError { Invalid = "Invalid homeserver discovery response", GenericFailure = "Failed to get autodiscovery configuration from server", InvalidHsBaseUrl = "Invalid base_url for m.homeserver", @@ -114,7 +114,7 @@ export class AutoDiscovery { public static readonly ERROR_HOMESERVER_TOO_OLD = AutoDiscoveryError.HomeserverTooOld; - public static readonly ALL_ERRORS = Object.keys(AutoDiscoveryError); + public static readonly ALL_ERRORS = Object.keys(AutoDiscoveryError) as AutoDiscoveryError[]; /** * The auto discovery failed. The client is expected to communicate