-
Notifications
You must be signed in to change notification settings - Fork 251
fix(amazonq): cancel chat export doesn't bubble error up to user #5723
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
Changes from all commits
1cb3cca
6634ff0
6d0df4e
a2c8672
5ba6cf9
72ef6d9
5707dcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,9 @@ | |
import org.eclipse.lsp4j.ShowDocumentParams | ||
import org.eclipse.lsp4j.ShowDocumentResult | ||
import org.eclipse.lsp4j.ShowMessageRequestParams | ||
import org.eclipse.lsp4j.jsonrpc.ResponseErrorException | ||
import org.eclipse.lsp4j.jsonrpc.messages.ResponseError | ||
import org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode | ||
import org.slf4j.event.Level | ||
import software.aws.toolkits.core.utils.error | ||
import software.aws.toolkits.core.utils.getLogger | ||
|
@@ -230,8 +233,7 @@ | |
|
||
chosenFile?.let { | ||
ShowSaveFileDialogResult(chosenFile.file.path) | ||
// TODO: Add error state shown in chat ui instead of throwing | ||
} ?: throw Error("Export failed") | ||
} ?: throw ResponseErrorException(ResponseError(ResponseErrorCode.RequestCancelled, "Export cancelled by user", null)) | ||
Check warning on line 236 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to throw this here to get the specific There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like they either choose a file or they dont There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other error condition that I can think of here is if a file is chosen which is not html or md if it exists but with the filtering dont think a user should run into this |
||
}, | ||
ApplicationManager.getApplication()::invokeLater | ||
) | ||
|
Uh oh!
There was an error while loading. Please reload this page.