summary refs log tree commit diff
path: root/synapse/rest/admin/_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/admin/_base.py')
-rw-r--r--synapse/rest/admin/_base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/admin/_base.py b/synapse/rest/admin/_base.py

index d9a2f6ca15..399b205aaf 100644 --- a/synapse/rest/admin/_base.py +++ b/synapse/rest/admin/_base.py
@@ -13,6 +13,7 @@ # limitations under the License. import re +from http import HTTPStatus from typing import Iterable, Pattern from synapse.api.auth import Auth @@ -62,4 +63,4 @@ async def assert_user_is_admin(auth: Auth, user_id: UserID) -> None: """ is_admin = await auth.is_server_admin(user_id) if not is_admin: - raise AuthError(403, "You are not a server admin") + raise AuthError(HTTPStatus.FORBIDDEN, "You are not a server admin")