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

check if search query actually returns an item #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kennnyshiwa
Copy link
Collaborator

I forgot that with the search endpoint you don't get a 404 only a count of 0 if the search doesn't exist this handles that

I forgot that with the search endpoint you don't get a 404 only a count of 0 if the search doesn't exist this handles that
Copy link
Owner

@NeuroAssassin NeuroAssassin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two quick things then it should be good to be merged.

  1. "Invalid ID" string, as said below
  2. Lines 318 and 390 should be unindented so that they aren't under the ctx.typing, but that may be my fault.

@@ -113,6 +113,8 @@ async def person(self, ctx, person_id: Union[int,str]):
if response.status == 404:
return await ctx.send("Invalid Person ID.")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a string/query and not an ID per se, could this and the other ones in the string queries be converted to just "Invalid person/film/etc"?

@NeuroAssassin NeuroAssassin self-assigned this May 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants