Fixed error handling for commands that only use the default error msgs

+ Fixes errors from the `me` command
master
Joey Hines 2019-10-02 08:21:24 -05:00
parent 6a45fe217a
commit 4858cccf2e
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ async def run_command(ctx, base_url, api_token, request_type, command, errors=No
if "error" in json: if "error" in json:
error_name = json["error"] error_name = json["error"]
if error_name in errors: if (errors is not None) and (error_name in errors):
msg = errors[error_name] msg = errors[error_name]
elif error_name in default_error_messages: elif error_name in default_error_messages:
msg = default_error_messages[error_name] msg = default_error_messages[error_name]