Skip to content

Commit

Permalink
Merge pull request #248 from weni-ai/fix/error-when-500-intelligence
Browse files Browse the repository at this point in the history
Fix error when nexus return 500
  • Loading branch information
lucaslinhares authored Jan 31, 2024
2 parents 366da26 + 26711d2 commit 2a4eae9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions temba/api/v2/wenigpt/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def get(self, request, *args, **kwargs):
headers=headers,
)

if response.status_code >= 400:
return Response({"results": []})

intelligences = response.json()

results = []
Expand Down

0 comments on commit 2a4eae9

Please sign in to comment.