Skip to content

Commit

Permalink
better error message for edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi authored and devxpy committed Aug 19, 2024
1 parent e1e376a commit 8087c2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/facebook_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ def fb_connect_redirect(request: Request):
retry_button = (
f'<a href="{fb_connect_url(current_run_id, published_run_id)}">Retry</a>'
)
if not current_run_id or not published_run_id:
return HTMLResponse(
f"<p>Oh No! Something went wrong here. Please go back to the integration page and try again or contact support. </p>",
status_code=400,
)
current_run = SavedRun.objects.get(run_id=current_run_id)
published_run = PublishedRun.objects.filter(
published_run_id=published_run_id
Expand Down

0 comments on commit 8087c2b

Please sign in to comment.