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

UnboundLocalError for GitHub fetch_search_github_resource on HTTP Error response #4627

Open
1 of 4 tasks
zachaysan opened this issue Sep 13, 2024 · 0 comments
Open
1 of 4 tasks
Assignees
Labels
api Issue related to the REST API bug Something isn't working

Comments

@zachaysan
Copy link
Contributor

How are you running Flagsmith

  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way (add details in description below)

Describe the bug

There is a bug the came up on Sentry here where the json_response has not been set due to a HTTP error being raised by the try / except block. The solution will likely add a response to the except block where the if condition fails.

Steps To Reproduce

Hard to reproduce since it's an unexpected error, but using mocks and testing the conditions can be simulated.

Expected behavior

Error responses should be sent as errors instead of continuing to process the data.

Screenshots

No response

@zachaysan zachaysan added the bug Something isn't working label Sep 13, 2024
@matthewelwell matthewelwell added the api Issue related to the REST API label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants