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

Add APIError catch to Dining #198

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Add APIError catch to Dining #198

merged 2 commits into from
Sep 14, 2023

Conversation

judtinzhang
Copy link
Member

No description provided.

try:
return Response(d.get_venues())
except APIError as e:
return Response({"error": str(e)}, status=400)

Copy link
Contributor

Choose a reason for hiding this comment

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

is this something we have to do for a lot of views?

Copy link
Member Author

Choose a reason for hiding this comment

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

yea, you're right this seems like some behavior we would like to create a wrapper for. @vcai122 can you log this as a github issue? we can tackle it another time

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@judtinzhang judtinzhang merged commit 3635350 into master Sep 14, 2023
7 checks passed
@judtinzhang judtinzhang deleted the judtin/dining-api-error branch September 14, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants