File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -459,13 +459,15 @@ export function isClientFault(error: ServiceException): boolean {
459459 return error . $fault === 'client' && ! ( isThrottlingError ( error ) || isTransientError ( error ) )
460460}
461461
462- export function getRequestId ( error : unknown ) : string | undefined {
463- if ( isAwsError ( error ) ) {
464- return error . requestId
462+ export function getRequestId ( err : unknown ) : string | undefined {
463+ if ( isAwsError ( err ) ) {
464+ return err . requestId
465465 }
466466
467- if ( error instanceof ServiceException ) {
468- return error . $metadata . requestId
467+ // XXX: Checking `err instanceof ServiceException` fails for `SSOOIDCServiceException` even
468+ // though it subclasses @aws -sdk/smithy-client.ServiceException
469+ if ( typeof ( err as any ) ?. $metadata ?. requestId === 'string' ) {
470+ return ( err as any ) . $metadata . requestId
469471 }
470472}
471473
You can’t perform that action at this time.
0 commit comments