Skip to content

Commit 6eec2ce

Browse files
authored
Export AutoDiscoveryError and fix type of ALL_ERRORS (#3768)
1 parent 68317ac commit 6eec2ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/autodiscovery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export enum AutoDiscoveryAction {
4141
FAIL_ERROR = "FAIL_ERROR",
4242
}
4343

44-
enum AutoDiscoveryError {
44+
export enum AutoDiscoveryError {
4545
Invalid = "Invalid homeserver discovery response",
4646
GenericFailure = "Failed to get autodiscovery configuration from server",
4747
InvalidHsBaseUrl = "Invalid base_url for m.homeserver",
@@ -114,7 +114,7 @@ export class AutoDiscovery {
114114

115115
public static readonly ERROR_HOMESERVER_TOO_OLD = AutoDiscoveryError.HomeserverTooOld;
116116

117-
public static readonly ALL_ERRORS = Object.keys(AutoDiscoveryError);
117+
public static readonly ALL_ERRORS = Object.keys(AutoDiscoveryError) as AutoDiscoveryError[];
118118

119119
/**
120120
* The auto discovery failed. The client is expected to communicate

0 commit comments

Comments
 (0)