Skip to content

GetIdCommand and fromCognitoIdentityPool do not provide information needed to diagnose problems when they fail #7996

@EmperorArthur

Description

@EmperorArthur

Checkboxes for prior research

Describe the bug

Attempting to obtain Cognito Credentials via fromCognitoIdentityPool or the underlying GetIdCommand fails when using the default FetchRequestHandler. Unfortunately, the error generated by AWS provides zero help in identifying what went wrong.

Edit: Specifically the error response is a generic 400, with no details about what is missing or incorrect.

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/package-name@version, ...

Which JavaScript Runtime is this issue in?

Browser

Details of the browser/Node.js/ReactNative version

tauri 2.8.5 on both Windows and Linux

Reproduction Steps

const region = ...;
const poolId = ...;

const credentials = fromCognitoIdentityPool({
            clientConfig: {
                region: region,
            },
            identityPoolId: poolId,
        });
const pollyClient = new PollyClient({
                region: region,
                credentials: credentials,
            });

Observed Behavior

Receive the following error:

{
  "$fault":"client",
  "$metadata":{
    "httpStatusCode":400,
    "requestId":"655cb486-48c5-4486-9e00-5a56c95f3de9",
    "attempts":1,
    "totalRetryDelay":0
  },
  "name":"BadRequest",
  "code":"BadRequest",
  "message":"The server did not understand the operation that was requested.",
  "type":"client"
}

Expected Behavior

Edit:

Receive an error response which identifies what portion of the request is missing or malformed.

Additional Information/Context

See Uhuh/tts-helper#53

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closing-soonThis issue will automatically close in 4 days unless further comments are made.p3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.third-partyThis issue is related to third-party libraries or applications.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions