Skip to content

Commit

Permalink
Exchanged console-error-statements with proper error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianca Wentzel committed Dec 16, 2024
1 parent 6ac470c commit 60d50b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/Containers/FrevaGPT/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class FrevaGPT extends React.Component {
pingSuccessful = true;
}
} catch (err) {
console.error("PingError: ", err);
pingSuccessful = false;
}

return pingSuccessful;
Expand Down Expand Up @@ -259,7 +259,9 @@ class FrevaGPT extends React.Component {
!subBuffer.includes("ServerHint") &&
!subBuffer.includes("Code")
) {
console.error(err);
this.props.dispatch(
addElement({ variant: "FrontendError", content: "Incomplete message received." })
);
}
}
}
Expand Down

0 comments on commit 60d50b7

Please sign in to comment.