mirror of https://gitlab.com/litecord/litecord.git
webhooks: fix unpack order
- run: add warn calls for expected errors
This commit is contained in:
parent
012567c9d2
commit
8c43bdcee7
|
|
@ -222,7 +222,7 @@ async def _update_webhook(webhook_id: int, j: dict):
|
||||||
@bp.route('/webhooks/<int:webhook_id>', methods=['PATCH'])
|
@bp.route('/webhooks/<int:webhook_id>', methods=['PATCH'])
|
||||||
async def modify_webhook(webhook_id: int):
|
async def modify_webhook(webhook_id: int):
|
||||||
"""Patch a webhook."""
|
"""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)
|
j = validate(await request.get_json(), WEBHOOK_UPDATE)
|
||||||
|
|
||||||
if 'channel_id' in j:
|
if 'channel_id' in j:
|
||||||
|
|
|
||||||
2
run.py
2
run.py
|
|
@ -373,6 +373,8 @@ async def handle_litecord_err(err):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
log.warning('error: {} {!r}', err.status_code, err.message)
|
||||||
|
|
||||||
return jsonify({
|
return jsonify({
|
||||||
'error': True,
|
'error': True,
|
||||||
'status': err.status_code,
|
'status': err.status_code,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue