diff --git a/matrix_webhook/handler.py b/matrix_webhook/handler.py index fbf94e1..e6f9c38 100644 --- a/matrix_webhook/handler.py +++ b/matrix_webhook/handler.py @@ -43,7 +43,7 @@ async def matrix_webhook(request): format = request.rel_url.query["formatter"] plugin = importlib.import_module(f"matrix_webhook.formatters.{format}", "formatter") data = plugin.formatter(data, request.headers) - except AttributeError: + except ModuleNotFoundError: return utils.create_json_response( HTTPStatus.BAD_REQUEST, "Unknown formatter" )