-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix]: added try catch block to handle errors in createNewConversation
function in Copilot.tsx
#118
Conversation
…ion in Copilot.tsx
@@ -14,41 +14,45 @@ let GlobalConversationID: string; | |||
|
|||
// going to use get all conversations with a few extra steps to store the current conversations locally. | |||
export function createNewConversation() { | |||
try{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @OlibhiaGhosh! This is great thank you!
Small thing, could you ensure that the spacing for the try/catch
is correct?
Ex:
try {
// ...
} catch (error) {
// ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked the spacing. It seems correct to me.
Is there any issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just keeping the syntax the same throughout so that there is a space between try
and {
and for the catch
as well 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes!
Can you please review it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Great work @OlibhiaGhosh !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Issue:
Enhancing error handling in the
createNewConversation
function in theCopilot.tsx
file.Description
The
createNewConversation
function in theCopilot.tsx
file currently lacks error handling, which can lead to potential issues during execution. To address this, the proposed change involves refactoring the function to include try-catch blocks for proper error handling.Issue Number: #113