parent
5337d4d98e
commit
332ad5ea52
13 changed files with 238 additions and 36 deletions
|
@ -75,6 +75,13 @@ class _Response:
|
|||
"errcode": "pid_mismatch",
|
||||
}, status=HTTPStatus.BAD_REQUEST)
|
||||
|
||||
@property
|
||||
def username_or_password_missing(self) -> web.Response:
|
||||
return web.json_response({
|
||||
"error": "Username or password missing",
|
||||
"errcode": "username_or_password_missing",
|
||||
}, status=HTTPStatus.BAD_REQUEST)
|
||||
|
||||
@property
|
||||
def bad_auth(self) -> web.Response:
|
||||
return web.json_response({
|
||||
|
@ -138,6 +145,13 @@ class _Response:
|
|||
"errcode": "resource_not_found",
|
||||
}, status=HTTPStatus.NOT_FOUND)
|
||||
|
||||
@property
|
||||
def server_not_found(self) -> web.Response:
|
||||
return web.json_response({
|
||||
"error": "Registration target server not found",
|
||||
"errcode": "server_not_found",
|
||||
}, status=HTTPStatus.NOT_FOUND)
|
||||
|
||||
@property
|
||||
def method_not_allowed(self) -> web.Response:
|
||||
return web.json_response({
|
||||
|
@ -196,6 +210,13 @@ class _Response:
|
|||
"errcode": "internal_server_error",
|
||||
}, status=HTTPStatus.INTERNAL_SERVER_ERROR)
|
||||
|
||||
@property
|
||||
def invalid_server(self) -> web.Response:
|
||||
return web.json_response({
|
||||
"error": "Invalid registration server object in maubot configuration",
|
||||
"errcode": "invalid_server",
|
||||
}, status=HTTPStatus.INTERNAL_SERVER_ERROR)
|
||||
|
||||
@property
|
||||
def unsupported_plugin_loader(self) -> web.Response:
|
||||
return web.json_response({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue