Skip to content

Commit

Permalink
Merge pull request #1263 from Agenta-AI/hotfix/error-in-playground
Browse files Browse the repository at this point in the history
Improve error handling in playground
  • Loading branch information
mmabrouk authored Jan 24, 2024
2 parents b56bdf5 + 5090c79 commit 80441cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,12 @@ const App: React.FC<TestViewProps> = ({
return newDataList
})
}
} catch (e) {
} catch (e: any) {
if (!controller.signal.aborted) {
setResultForIndex(`❌ ${getErrorMessage(e)}`, index)
setResultForIndex(
`❌ ${getErrorMessage(e?.response?.data?.error || e?.response?.data, e)}`,
index,
)
} else {
setResultForIndex("", index)
setAdditionalDataList((prev) => {
Expand Down

0 comments on commit 80441cd

Please sign in to comment.