Skip to content

Commit b7026c7

Browse files
committed
QFeatureDev- handled upload failure with specific message
1 parent f1c5d45 commit b7026c7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packages/core/src/amazonq/webview/ui/texts/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ export const uiComponentsTexts = {
2727
}
2828

2929
export const userGuideURL = 'https://docs.aws.amazon.com/amazonq/latest/aws-builder-use-ug/getting-started.html'
30+
export const manageAccessGuideURL =
31+
'https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/security_iam_manage-access-with-policies.html'

packages/core/src/amazonqFeatureDev/errors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { ToolkitError } from '../shared/errors'
77
import { featureName } from './constants'
8+
import { uploadCodeError } from './userFacingText'
89

910
export class ConversationIdNotFoundError extends ToolkitError {
1011
constructor() {
@@ -57,7 +58,7 @@ export class PrepareRepoFailedError extends ToolkitError {
5758

5859
export class UploadCodeError extends ToolkitError {
5960
constructor(statusCode: string) {
60-
super('Unable to upload code', { code: `UploadCode-${statusCode}` })
61+
super(uploadCodeError, { code: `UploadCode-${statusCode}` })
6162
}
6263
}
6364

packages/core/src/amazonqFeatureDev/userFacingText.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
import { manageAccessGuideURL } from '../amazonq/webview/ui/texts/constants'
67
import { userGuideURL } from '../amazonq/webview/ui/texts/constants'
78

89
export const examples = `
@@ -19,3 +20,4 @@ export const approachCreation = 'Ok, let me create a plan. This may take a few m
1920
export const updateCode = 'Code has been updated. Would you like to work on another task?'
2021
export const sessionClosed = 'Your session is now closed.'
2122
export const newTaskChanges = 'What change would you like to make?'
23+
export const uploadCodeError = `Amazon Q is unable to upload workspace artifacts to S3 for feature development. For more information, see the [Amazon Q documentation](${manageAccessGuideURL}) or contact your network or organization administrator.`

0 commit comments

Comments
 (0)