Skip to content

Commit 7dc7024

Browse files
committed
Update cfapi.py
1 parent d08e766 commit 7dc7024

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

codeflash/api/cfapi.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,11 @@ def get_blocklisted_functions() -> dict[str, set[str]] | dict[str, Any]:
183183
information = {"pr_number": pr_number, "repo_owner": owner, "repo_name": repo}
184184
try:
185185
req = make_cfapi_request(endpoint="/verify-existing-optimizations", method="POST", payload=information)
186-
if req.status_code == not_found:
187-
logger.debug(req.json()["error"])
188-
return {}
189-
if req.status_code == internal_server_error:
190-
logger.error(req.json()["error"])
191-
return {}
192186
req.raise_for_status()
193187
content: dict[str, list[str]] = req.json()
194188
except Exception as e:
195189
logger.error(f"Error getting blocklisted functions: {e}")
196190
sentry_sdk.capture_exception(e)
197191
return {}
198192

199-
return {Path(k).name: {v.replace("()", "") for v in values} for k, values in content.items()}
193+
return {Path(k).name: {v.replace("()", "") for v in values} for k, values in content.items()}

0 commit comments

Comments
 (0)