@@ -14,7 +14,7 @@ import * as diagnosticsProvider from '../../codewhisperer/service/diagnosticsPro
1414import { getTestWorkspaceFolder } from '../../testInteg/integrationTestsUtilities'
1515import { join } from 'path'
1616import { assertTelemetry , closeAllEditors , getFetchStubWithResponse } from '../testUtil'
17- import { ServiceException } from '@smithy/smithy-client '
17+ import { AWSError } from 'aws-sdk '
1818import { getTestWindow } from '../shared/vscode/window'
1919import { SeverityLevel } from '../shared/vscode/message'
2020import { cancel } from '../../shared/localizedText'
@@ -334,11 +334,11 @@ describe('startSecurityScan', function () {
334334 getFetchStubWithResponse ( { status : 200 , statusText : 'testing stub' } )
335335 const mockClient = createClient ( )
336336 mockClient . createCodeScan . throws ( {
337- name : 'ThrottlingException' ,
337+ code : 'ThrottlingException' ,
338+ time : new Date ( ) ,
339+ name : 'error name' ,
338340 message : scansLimitReachedErrorMessage ,
339- $fault : 'client' ,
340- $metadata : { } ,
341- } satisfies ServiceException )
341+ } satisfies AWSError )
342342 sinon . stub ( errors , 'isAwsError' ) . returns ( true )
343343 const testWindow = getTestWindow ( )
344344 await startSecurityScan . startSecurityScan (
@@ -365,11 +365,11 @@ describe('startSecurityScan', function () {
365365 await model . CodeScansState . instance . setScansEnabled ( true )
366366 const mockClient = createClient ( )
367367 mockClient . createCodeScan . throws ( {
368- name : 'ThrottlingException' ,
368+ code : 'ThrottlingException' ,
369+ time : new Date ( ) ,
370+ name : 'error name' ,
369371 message : 'Maximum file scans count reached for this month' ,
370- $fault : 'client' ,
371- $metadata : { } ,
372- } satisfies ServiceException )
372+ } satisfies AWSError )
373373 sinon . stub ( errors , 'isAwsError' ) . returns ( true )
374374 assert . equal ( model . CodeScansState . instance . isMonthlyQuotaExceeded ( ) , false )
375375 await startSecurityScan . startSecurityScan (
0 commit comments