From 8c43bdcee7c19fe82b20e5d4992e930148bc1999 Mon Sep 17 00:00:00 2001 From: Luna Date: Mon, 18 Mar 2019 17:50:59 -0300 Subject: [PATCH] webhooks: fix unpack order - run: add warn calls for expected errors --- litecord/blueprints/webhooks.py | 2 +- run.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litecord/blueprints/webhooks.py b/litecord/blueprints/webhooks.py index a604014..b333804 100644 --- a/litecord/blueprints/webhooks.py +++ b/litecord/blueprints/webhooks.py @@ -222,7 +222,7 @@ async def _update_webhook(webhook_id: int, j: dict): @bp.route('/webhooks/', methods=['PATCH']) async def modify_webhook(webhook_id: int): """Patch a webhook.""" - guild_id, _user_id = await _webhook_check_fw(webhook_id) + _user_id, guild_id = await _webhook_check_fw(webhook_id) j = validate(await request.get_json(), WEBHOOK_UPDATE) if 'channel_id' in j: diff --git a/run.py b/run.py index f8bf1c7..ef5e118 100644 --- a/run.py +++ b/run.py @@ -373,6 +373,8 @@ async def handle_litecord_err(err): except AttributeError: pass + log.warning('error: {} {!r}', err.status_code, err.message) + return jsonify({ 'error': True, 'status': err.status_code,