amundsen-io / amundsen

Amundsen is a metadata driven application for improving the productivity of data analysts, data scientists and engineers when interacting with data.
https://www.amundsen.io/amundsen/
Apache License 2.0
4.37k stars 953 forks source link

fix: UnboundLocalError for msg in create_search_response #2162

Closed kristenarmes closed 1 year ago

kristenarmes commented 1 year ago

Description

Initialize the msg and status_code variables at the top of the create_search_response util function for the search proxy

Motivation and Context

We were getting this exception: UnboundLocalError: local variable 'msg' referenced before assignment To mitigate this, now initialize the variables that were previously only set within the for loop at the top of the function.

CheckList