Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes untappd response may have "meta" but not "code" #151

Open
AardWolf opened this issue Sep 17, 2019 · 0 comments
Open

Sometimes untappd response may have "meta" but not "code" #151

AardWolf opened this issue Sep 17, 2019 · 0 comments

Comments

@AardWolf
Copy link
Owner

[2019-09-17 18:04:50] [ERROR] red: Exception in command 'findbeer'
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.7.2/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
    ret = await coro(*args, **kwargs)
  File "/opt/red3/cogs/CogManager/cogs/untappd/untappd.py", line 582, in findbeer
    limit=list_limit)
  File "/opt/red3/cogs/CogManager/cogs/untappd/untappd.py", line 1492, in search_beer_to_embed
    beers = await search_beer(config, ctx, query, limit)
  File "/opt/red3/cogs/CogManager/cogs/untappd/untappd.py", line 1482, in search_beer
    if resp["meta"]["code"] == 200:
TypeError: string indices must be integers

Almost certainly an error on untappd side. But we're already checking if meta is part of the response. Let's check if code is too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant