Skip to content

Commit 5cf78a4

Browse files
committed
chore: remove httpCode from FederationValidationError
1 parent 7f407d6 commit 5cf78a4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/federation-sdk/src/services/federation-validation.service.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export class FederationValidationError extends Error {
1313
constructor(
1414
public code: 'POLICY_DENIED' | 'CONNECTION_FAILED' | 'USER_NOT_FOUND',
1515
public userMessage: string,
16-
public httpStatus: 403 | 502 | 404,
1716
) {
1817
super(userMessage);
1918
this.name = 'FederationValidationError';
@@ -59,7 +58,6 @@ export class FederationValidationService {
5958
throw new FederationValidationError(
6059
'POLICY_DENIED',
6160
"Action Blocked. The room's access control policy blocks communication with this domain.",
62-
403,
6361
);
6462
}
6563
} catch (error) {
@@ -83,7 +81,6 @@ export class FederationValidationService {
8381
throw new FederationValidationError(
8482
'CONNECTION_FAILED',
8583
'Connection Failed. The server domain could not be reached or does not support federation.',
86-
502,
8784
);
8885
}
8986
}
@@ -105,8 +102,7 @@ export class FederationValidationService {
105102
} catch (_error) {
106103
throw new FederationValidationError(
107104
'USER_NOT_FOUND',
108-
'Invitation blocked. The specified user couldn’t be found on their homeserver.',
109-
502,
105+
"Invitation blocked. The specified user couldn't be found on their homeserver.",
110106
);
111107
}
112108
}

0 commit comments

Comments
 (0)