Skip to content

Commit

Permalink
Added response for error scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
amitjoshi committed May 14, 2024
1 parent e005e50 commit 491cee2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class PowerPagesChatParticipant {
): Promise<IPowerPagesChatResult> => {
// Handle chat requests here

//TODO: Move strings to constant once finalized
stream.progress('Working on it...')

await this.intializeOrgDetails();
Expand All @@ -97,7 +98,7 @@ export class PowerPagesChatParticipant {

if (!intelligenceApiAuthResponse) {

//TODO: Handle auth error and provide a way to re-authenticate
stream.markdown('Authentication failed. Please try again.');

return {
metadata: {
Expand All @@ -111,7 +112,8 @@ export class PowerPagesChatParticipant {
const { intelligenceEndpoint, geoName } = await this.getEndpoint(this.orgID, this.telemetry);

if (!intelligenceEndpoint || !geoName) {
//TODO: Handle error

stream.markdown('Copilot is not available. Please contact your administrator.')

return {
metadata: {
Expand Down

0 comments on commit 491cee2

Please sign in to comment.