Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,20 @@ export class Messenger {
}

private showChatExceptionMessage(e: ChatException, tabID: string, requestID: string | undefined) {
const title = 'An error occurred while processing your request.'
// TODO: once the server sends the correct exception back, fix this
if (e.statusCode && e.statusCode === '500') {
// Send throttling message
this.dispatcher.sendErrorMessage(
new ErrorMessage(
title,
'We are experiencing heavy traffic, please try again shortly.'.trimEnd().trimStart(),
tabID
)
)
return
}

let message = 'This error is reported to the team automatically. We will attempt to fix it as soon as possible.'
if (e.errorMessage !== undefined) {
message += `\n\nDetails: ${e.errorMessage}`
Expand All @@ -769,9 +783,7 @@ export class Messenger {
message += `\n\nRequest ID: ${requestID}`
}

this.dispatcher.sendErrorMessage(
new ErrorMessage('An error occurred while processing your request.', message.trimEnd().trimStart(), tabID)
)
this.dispatcher.sendErrorMessage(new ErrorMessage(title, message.trimEnd().trimStart(), tabID))
}

public sendOpenSettingsMessage(triggerId: string, tabID: string) {
Expand Down
Loading