@rio-cloud/cdk-v2-constructs 7.14.0-alpha.2 → 7.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +7 -7
- package/lib/contributions/team-transport-two/datadog-synthetics/datadog-synthetics-test-custom-resource/handler.cjs +2195 -1273
- package/lib/datadogv2/secret-locator-custom-resource/on-create.cjs +2363 -1441
- package/lib/datadogv2/service-catalog-custom-resource/on-create.cjs +2234 -1312
- package/lib/fargate/codedeploy-custom-resources/create-deployment-is-complete.cjs +2237 -1315
- package/lib/fargate/codedeploy-custom-resources/create-deployment-on-create.cjs +2237 -1315
- package/lib/fargate/codedeploy-custom-resources/run-monitoring-test-suite-runner.cjs +2242 -1319
- package/lib/fargate/datadog.js +3 -1
- package/node_modules/@aws-sdk/client-cloudformation/README.md +26 -46
- package/node_modules/@aws-sdk/client-cloudformation/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudformation/package.json +39 -39
- package/node_modules/@aws-sdk/client-codedeploy/README.md +26 -46
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-codedeploy/package.json +39 -39
- package/node_modules/@aws-sdk/client-ecs/README.md +26 -46
- package/node_modules/@aws-sdk/client-ecs/dist-cjs/schemas/schemas_0.js +5 -4
- package/node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js +5 -4
- package/node_modules/@aws-sdk/client-ecs/dist-types/commands/CreateCapacityProviderCommand.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ecs/dist-types/commands/DeleteCapacityProviderCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ecs/dist-types/commands/DescribeCapacityProvidersCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ecs/dist-types/commands/UpdateCapacityProviderCommand.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ecs/dist-types/models/models_0.d.ts +10 -0
- package/node_modules/@aws-sdk/client-ecs/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-ecs/package.json +39 -39
- package/node_modules/@aws-sdk/client-organizations/README.md +26 -46
- package/node_modules/@aws-sdk/client-organizations/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-organizations/package.json +38 -38
- package/node_modules/@aws-sdk/client-secrets-manager/README.md +26 -46
- package/node_modules/@aws-sdk/client-secrets-manager/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-secrets-manager/package.json +39 -39
- package/node_modules/@aws-sdk/client-ssm/README.md +26 -46
- package/node_modules/@aws-sdk/client-ssm/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/client-ssm/package.json +39 -39
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +58 -21
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +58 -21
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +24 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +6 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +6 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +6 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +9 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ProtocolLib.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +3 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +3 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +3 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsQueryProtocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +2 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +2 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +6 -1
- package/node_modules/@aws-sdk/core/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +15 -15
- package/node_modules/@aws-sdk/credential-provider-login/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
- package/node_modules/@aws-sdk/middleware-host-header/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-logger/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +4 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/LICENSE +201 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/README.md +78 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-cjs/index.js +278 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +27 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +19 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +109 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +67 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/config.js +7 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/constants.js +9 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +14 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +11 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/index.js +7 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/types.js +1 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts +33 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ConfiguredRetryStrategy.d.ts +32 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/DefaultRateLimiter.d.ts +49 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts +26 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/config.d.ts +20 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/constants.d.ts +59 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/defaultRetryBackoffStrategy.d.ts +5 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/defaultRetryToken.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/index.d.ts +7 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts +33 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/ConfiguredRetryStrategy.d.ts +32 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/DefaultRateLimiter.d.ts +49 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts +26 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/config.d.ts +20 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/constants.d.ts +59 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryBackoffStrategy.d.ts +5 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/index.d.ts +7 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/types.d.ts +19 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/types.d.ts +19 -0
- package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/package.json +71 -0
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +9 -8
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +39 -37
- package/node_modules/@aws-sdk/region-config-resolver/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +8 -8
- package/node_modules/@aws-sdk/types/package.json +3 -3
- package/node_modules/@aws-sdk/util-endpoints/package.json +6 -6
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +75 -19
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js +15 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js +14 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +53 -7
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/{getTypeScriptPackageJsonPaths.d.ts → getNodeModulesParentDirs.d.ts} +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedDevTypeScriptVersion.d.ts +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getNodeModulesParentDirs.d.ts +1 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedDevTypeScriptVersion.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +7 -6
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +21 -11
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +5 -1
- package/node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +8 -1
- package/node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +13 -10
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +5 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +12 -0
- package/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +5 -0
- package/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +5 -0
- package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts +6 -0
- package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts +6 -0
- package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts +6 -0
- package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts +6 -0
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +1 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +11 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +42 -5
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +31 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/endpoints.d.ts +7 -0
- package/node_modules/@smithy/core/endpoints.js +6 -0
- package/node_modules/@smithy/core/package.json +16 -7
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +17 -1
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +9 -0
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +8 -1
- package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts +2 -2
- package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +9 -12
- package/node_modules/@smithy/middleware-retry/dist-es/configurations.js +9 -12
- package/node_modules/@smithy/middleware-retry/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +3 -2
- package/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +3 -2
- package/node_modules/@smithy/middleware-serde/package.json +4 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +48 -38
- package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +4 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +38 -31
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +6 -6
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -4
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -4
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/http.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +1 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +1 -1
- package/node_modules/@smithy/util-waiter/dist-es/poller.js +1 -1
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/fast-xml-builder/CHANGELOG.md +16 -0
- package/node_modules/fast-xml-builder/README.md +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -0
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +22 -9
- package/node_modules/fast-xml-builder/lib/fxb.min.js +2 -0
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -0
- package/node_modules/fast-xml-builder/package.json +7 -5
- package/node_modules/fast-xml-builder/src/fxb.d.ts +27 -3
- package/node_modules/fast-xml-builder/src/fxb.js +265 -21
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +165 -18
- package/node_modules/fast-xml-parser/CHANGELOG.md +40 -4
- package/node_modules/fast-xml-parser/README.md +8 -7
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +82 -20
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/pem.d.cts +148 -0
- package/node_modules/fast-xml-parser/package.json +4 -3
- package/node_modules/fast-xml-parser/src/fxp.d.ts +75 -19
- package/node_modules/fast-xml-parser/src/pem.d.ts +135 -0
- package/node_modules/fast-xml-parser/src/util.js +18 -0
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +37 -18
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +76 -5
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +298 -116
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +2 -2
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +65 -15
- package/node_modules/path-expression-matcher/LICENSE +21 -0
- package/node_modules/path-expression-matcher/README.md +720 -0
- package/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
- package/node_modules/path-expression-matcher/lib/pem.d.cts +523 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
- package/node_modules/path-expression-matcher/package.json +78 -0
- package/node_modules/path-expression-matcher/src/Expression.js +232 -0
- package/node_modules/path-expression-matcher/src/Matcher.js +498 -0
- package/node_modules/path-expression-matcher/src/index.d.ts +518 -0
- package/node_modules/path-expression-matcher/src/index.js +28 -0
- package/package.json +7 -7
- package/version.json +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +0 -17
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +0 -3
- package/node_modules/fast-xml-builder/lib/builder.cjs +0 -1
- package/node_modules/fast-xml-builder/lib/builder.min.js +0 -2
- package/node_modules/fast-xml-builder/lib/builder.min.js.map +0 -1
|
@@ -349,6 +349,7 @@ function bindCallerConfig(config, credentialsProvider) {
|
|
|
349
349
|
|
|
350
350
|
class ProtocolLib {
|
|
351
351
|
queryCompat;
|
|
352
|
+
errorRegistry;
|
|
352
353
|
constructor(queryCompat = false) {
|
|
353
354
|
this.queryCompat = queryCompat;
|
|
354
355
|
}
|
|
@@ -384,30 +385,47 @@ class ProtocolLib {
|
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
387
|
async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
|
|
387
|
-
let namespace = defaultNamespace;
|
|
388
388
|
let errorName = errorIdentifier;
|
|
389
389
|
if (errorIdentifier.includes("#")) {
|
|
390
|
-
[
|
|
390
|
+
[, errorName] = errorIdentifier.split("#");
|
|
391
391
|
}
|
|
392
392
|
const errorMetadata = {
|
|
393
393
|
$metadata: metadata,
|
|
394
394
|
$fault: response.statusCode < 500 ? "client" : "server",
|
|
395
395
|
};
|
|
396
|
-
|
|
396
|
+
if (!this.errorRegistry) {
|
|
397
|
+
throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
398
|
+
}
|
|
397
399
|
try {
|
|
398
|
-
const errorSchema = getErrorSchema?.(
|
|
400
|
+
const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ??
|
|
401
|
+
this.errorRegistry.getSchema(errorIdentifier);
|
|
399
402
|
return { errorSchema, errorMetadata };
|
|
400
403
|
}
|
|
401
404
|
catch (e) {
|
|
402
405
|
dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
403
|
-
const synthetic =
|
|
406
|
+
const synthetic = this.errorRegistry;
|
|
404
407
|
const baseExceptionSchema = synthetic.getBaseException();
|
|
405
408
|
if (baseExceptionSchema) {
|
|
406
409
|
const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
|
|
407
410
|
throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
|
|
408
411
|
}
|
|
409
|
-
|
|
412
|
+
const d = dataObject;
|
|
413
|
+
const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
|
|
414
|
+
throw this.decorateServiceException(Object.assign(new Error(message), {
|
|
415
|
+
name: errorName,
|
|
416
|
+
}, errorMetadata), dataObject);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
compose(composite, errorIdentifier, defaultNamespace) {
|
|
420
|
+
let namespace = defaultNamespace;
|
|
421
|
+
if (errorIdentifier.includes("#")) {
|
|
422
|
+
[namespace] = errorIdentifier.split("#");
|
|
410
423
|
}
|
|
424
|
+
const staticRegistry = schema.TypeRegistry.for(namespace);
|
|
425
|
+
const defaultSyntheticRegistry = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
|
|
426
|
+
composite.copyFrom(staticRegistry);
|
|
427
|
+
composite.copyFrom(defaultSyntheticRegistry);
|
|
428
|
+
this.errorRegistry = composite;
|
|
411
429
|
}
|
|
412
430
|
decorateServiceException(exception, additions = {}) {
|
|
413
431
|
if (this.queryCompat) {
|
|
@@ -471,8 +489,8 @@ class ProtocolLib {
|
|
|
471
489
|
class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol {
|
|
472
490
|
awsQueryCompatible;
|
|
473
491
|
mixin;
|
|
474
|
-
constructor({ defaultNamespace, awsQueryCompatible, }) {
|
|
475
|
-
super({ defaultNamespace });
|
|
492
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {
|
|
493
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
476
494
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
477
495
|
this.mixin = new ProtocolLib(this.awsQueryCompatible);
|
|
478
496
|
}
|
|
@@ -494,10 +512,11 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol {
|
|
|
494
512
|
}
|
|
495
513
|
return cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
496
514
|
})();
|
|
515
|
+
this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
|
|
497
516
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
498
517
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
499
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
500
|
-
const ErrorCtor =
|
|
518
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
519
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
501
520
|
const exception = new ErrorCtor(message);
|
|
502
521
|
const output = {};
|
|
503
522
|
for (const [name, member] of ns.structIterator()) {
|
|
@@ -1054,9 +1073,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
1054
1073
|
codec;
|
|
1055
1074
|
mixin;
|
|
1056
1075
|
awsQueryCompatible;
|
|
1057
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1076
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1058
1077
|
super({
|
|
1059
1078
|
defaultNamespace,
|
|
1079
|
+
errorTypeRegistries,
|
|
1060
1080
|
});
|
|
1061
1081
|
this.serviceTarget = serviceTarget;
|
|
1062
1082
|
this.codec =
|
|
@@ -1098,10 +1118,11 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
1098
1118
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
1099
1119
|
}
|
|
1100
1120
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
1121
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1101
1122
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
1102
1123
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1103
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
1104
|
-
const ErrorCtor =
|
|
1124
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
1125
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1105
1126
|
const exception = new ErrorCtor(message);
|
|
1106
1127
|
const output = {};
|
|
1107
1128
|
for (const [name, member] of ns.structIterator()) {
|
|
@@ -1120,9 +1141,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
1120
1141
|
}
|
|
1121
1142
|
|
|
1122
1143
|
class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
1123
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1144
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1124
1145
|
super({
|
|
1125
1146
|
defaultNamespace,
|
|
1147
|
+
errorTypeRegistries,
|
|
1126
1148
|
serviceTarget,
|
|
1127
1149
|
awsQueryCompatible,
|
|
1128
1150
|
jsonCodec,
|
|
@@ -1140,9 +1162,10 @@ class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
|
1140
1162
|
}
|
|
1141
1163
|
|
|
1142
1164
|
class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
1143
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1165
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
1144
1166
|
super({
|
|
1145
1167
|
defaultNamespace,
|
|
1168
|
+
errorTypeRegistries,
|
|
1146
1169
|
serviceTarget,
|
|
1147
1170
|
awsQueryCompatible,
|
|
1148
1171
|
jsonCodec,
|
|
@@ -1164,9 +1187,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
1164
1187
|
deserializer;
|
|
1165
1188
|
codec;
|
|
1166
1189
|
mixin = new ProtocolLib();
|
|
1167
|
-
constructor({ defaultNamespace }) {
|
|
1190
|
+
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
1168
1191
|
super({
|
|
1169
1192
|
defaultNamespace,
|
|
1193
|
+
errorTypeRegistries,
|
|
1170
1194
|
});
|
|
1171
1195
|
const settings = {
|
|
1172
1196
|
timestampFormat: {
|
|
@@ -1216,10 +1240,11 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
1216
1240
|
}
|
|
1217
1241
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1218
1242
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
1243
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1219
1244
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
1220
1245
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1221
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
1222
|
-
const ErrorCtor =
|
|
1246
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
1247
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1223
1248
|
const exception = new ErrorCtor(message);
|
|
1224
1249
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
1225
1250
|
const output = {};
|
|
@@ -1585,6 +1610,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1585
1610
|
constructor(options) {
|
|
1586
1611
|
super({
|
|
1587
1612
|
defaultNamespace: options.defaultNamespace,
|
|
1613
|
+
errorTypeRegistries: options.errorTypeRegistries,
|
|
1588
1614
|
});
|
|
1589
1615
|
this.options = options;
|
|
1590
1616
|
const settings = {
|
|
@@ -1661,6 +1687,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1661
1687
|
}
|
|
1662
1688
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1663
1689
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
1690
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1664
1691
|
const errorData = this.loadQueryError(dataObject) ?? {};
|
|
1665
1692
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
1666
1693
|
errorData.message = message;
|
|
@@ -1671,7 +1698,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1671
1698
|
};
|
|
1672
1699
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
|
|
1673
1700
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1674
|
-
const ErrorCtor =
|
|
1701
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1675
1702
|
const exception = new ErrorCtor(message);
|
|
1676
1703
|
const output = {
|
|
1677
1704
|
Type: errorData.Error.Type,
|
|
@@ -1722,6 +1749,9 @@ class AwsEc2QueryProtocol extends AwsQueryProtocol {
|
|
|
1722
1749
|
};
|
|
1723
1750
|
Object.assign(this.serializer.settings, ec2Settings);
|
|
1724
1751
|
}
|
|
1752
|
+
getShapeId() {
|
|
1753
|
+
return "aws.protocols#ec2Query";
|
|
1754
|
+
}
|
|
1725
1755
|
useNestedResult() {
|
|
1726
1756
|
return false;
|
|
1727
1757
|
}
|
|
@@ -2097,6 +2127,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
2097
2127
|
this.codec = new XmlCodec(settings);
|
|
2098
2128
|
this.serializer = new protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
|
|
2099
2129
|
this.deserializer = new protocols.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
|
|
2130
|
+
this.compositeErrorRegistry;
|
|
2100
2131
|
}
|
|
2101
2132
|
getPayloadCodec() {
|
|
2102
2133
|
return this.codec;
|
|
@@ -2126,6 +2157,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
2126
2157
|
}
|
|
2127
2158
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
2128
2159
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
2160
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
2129
2161
|
if (dataObject.Error && typeof dataObject.Error === "object") {
|
|
2130
2162
|
for (const key of Object.keys(dataObject.Error)) {
|
|
2131
2163
|
dataObject[key] = dataObject.Error[key];
|
|
@@ -2139,8 +2171,12 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
2139
2171
|
}
|
|
2140
2172
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
2141
2173
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
2142
|
-
const message = dataObject.Error?.message ??
|
|
2143
|
-
|
|
2174
|
+
const message = dataObject.Error?.message ??
|
|
2175
|
+
dataObject.Error?.Message ??
|
|
2176
|
+
dataObject.message ??
|
|
2177
|
+
dataObject.Message ??
|
|
2178
|
+
"UnknownError";
|
|
2179
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
2144
2180
|
const exception = new ErrorCtor(message);
|
|
2145
2181
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
2146
2182
|
const output = {};
|
|
@@ -2183,6 +2219,7 @@ exports.JsonShapeDeserializer = JsonShapeDeserializer;
|
|
|
2183
2219
|
exports.JsonShapeSerializer = JsonShapeSerializer;
|
|
2184
2220
|
exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
|
|
2185
2221
|
exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
|
|
2222
|
+
exports.QueryShapeSerializer = QueryShapeSerializer;
|
|
2186
2223
|
exports.XmlCodec = XmlCodec;
|
|
2187
2224
|
exports.XmlShapeDeserializer = XmlShapeDeserializer;
|
|
2188
2225
|
exports.XmlShapeSerializer = XmlShapeSerializer;
|
|
@@ -11,6 +11,7 @@ var xmlBuilder = require('@aws-sdk/xml-builder');
|
|
|
11
11
|
|
|
12
12
|
class ProtocolLib {
|
|
13
13
|
queryCompat;
|
|
14
|
+
errorRegistry;
|
|
14
15
|
constructor(queryCompat = false) {
|
|
15
16
|
this.queryCompat = queryCompat;
|
|
16
17
|
}
|
|
@@ -46,30 +47,47 @@ class ProtocolLib {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
|
|
49
|
-
let namespace = defaultNamespace;
|
|
50
50
|
let errorName = errorIdentifier;
|
|
51
51
|
if (errorIdentifier.includes("#")) {
|
|
52
|
-
[
|
|
52
|
+
[, errorName] = errorIdentifier.split("#");
|
|
53
53
|
}
|
|
54
54
|
const errorMetadata = {
|
|
55
55
|
$metadata: metadata,
|
|
56
56
|
$fault: response.statusCode < 500 ? "client" : "server",
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
if (!this.errorRegistry) {
|
|
59
|
+
throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
60
|
+
}
|
|
59
61
|
try {
|
|
60
|
-
const errorSchema = getErrorSchema?.(
|
|
62
|
+
const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ??
|
|
63
|
+
this.errorRegistry.getSchema(errorIdentifier);
|
|
61
64
|
return { errorSchema, errorMetadata };
|
|
62
65
|
}
|
|
63
66
|
catch (e) {
|
|
64
67
|
dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
65
|
-
const synthetic =
|
|
68
|
+
const synthetic = this.errorRegistry;
|
|
66
69
|
const baseExceptionSchema = synthetic.getBaseException();
|
|
67
70
|
if (baseExceptionSchema) {
|
|
68
71
|
const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
|
|
69
72
|
throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
|
|
70
73
|
}
|
|
71
|
-
|
|
74
|
+
const d = dataObject;
|
|
75
|
+
const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
|
|
76
|
+
throw this.decorateServiceException(Object.assign(new Error(message), {
|
|
77
|
+
name: errorName,
|
|
78
|
+
}, errorMetadata), dataObject);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
compose(composite, errorIdentifier, defaultNamespace) {
|
|
82
|
+
let namespace = defaultNamespace;
|
|
83
|
+
if (errorIdentifier.includes("#")) {
|
|
84
|
+
[namespace] = errorIdentifier.split("#");
|
|
72
85
|
}
|
|
86
|
+
const staticRegistry = schema.TypeRegistry.for(namespace);
|
|
87
|
+
const defaultSyntheticRegistry = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
|
|
88
|
+
composite.copyFrom(staticRegistry);
|
|
89
|
+
composite.copyFrom(defaultSyntheticRegistry);
|
|
90
|
+
this.errorRegistry = composite;
|
|
73
91
|
}
|
|
74
92
|
decorateServiceException(exception, additions = {}) {
|
|
75
93
|
if (this.queryCompat) {
|
|
@@ -133,8 +151,8 @@ class ProtocolLib {
|
|
|
133
151
|
class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol {
|
|
134
152
|
awsQueryCompatible;
|
|
135
153
|
mixin;
|
|
136
|
-
constructor({ defaultNamespace, awsQueryCompatible, }) {
|
|
137
|
-
super({ defaultNamespace });
|
|
154
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {
|
|
155
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
138
156
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
139
157
|
this.mixin = new ProtocolLib(this.awsQueryCompatible);
|
|
140
158
|
}
|
|
@@ -156,10 +174,11 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol {
|
|
|
156
174
|
}
|
|
157
175
|
return cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
158
176
|
})();
|
|
177
|
+
this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
|
|
159
178
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
160
179
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
161
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
162
|
-
const ErrorCtor =
|
|
180
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
181
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
163
182
|
const exception = new ErrorCtor(message);
|
|
164
183
|
const output = {};
|
|
165
184
|
for (const [name, member] of ns.structIterator()) {
|
|
@@ -716,9 +735,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
716
735
|
codec;
|
|
717
736
|
mixin;
|
|
718
737
|
awsQueryCompatible;
|
|
719
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
738
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
720
739
|
super({
|
|
721
740
|
defaultNamespace,
|
|
741
|
+
errorTypeRegistries,
|
|
722
742
|
});
|
|
723
743
|
this.serviceTarget = serviceTarget;
|
|
724
744
|
this.codec =
|
|
@@ -760,10 +780,11 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
760
780
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
761
781
|
}
|
|
762
782
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
783
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
763
784
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
764
785
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
765
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
766
|
-
const ErrorCtor =
|
|
786
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
787
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
767
788
|
const exception = new ErrorCtor(message);
|
|
768
789
|
const output = {};
|
|
769
790
|
for (const [name, member] of ns.structIterator()) {
|
|
@@ -782,9 +803,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
782
803
|
}
|
|
783
804
|
|
|
784
805
|
class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
785
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
806
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
786
807
|
super({
|
|
787
808
|
defaultNamespace,
|
|
809
|
+
errorTypeRegistries,
|
|
788
810
|
serviceTarget,
|
|
789
811
|
awsQueryCompatible,
|
|
790
812
|
jsonCodec,
|
|
@@ -802,9 +824,10 @@ class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
|
802
824
|
}
|
|
803
825
|
|
|
804
826
|
class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
805
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
827
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
806
828
|
super({
|
|
807
829
|
defaultNamespace,
|
|
830
|
+
errorTypeRegistries,
|
|
808
831
|
serviceTarget,
|
|
809
832
|
awsQueryCompatible,
|
|
810
833
|
jsonCodec,
|
|
@@ -826,9 +849,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
826
849
|
deserializer;
|
|
827
850
|
codec;
|
|
828
851
|
mixin = new ProtocolLib();
|
|
829
|
-
constructor({ defaultNamespace }) {
|
|
852
|
+
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
830
853
|
super({
|
|
831
854
|
defaultNamespace,
|
|
855
|
+
errorTypeRegistries,
|
|
832
856
|
});
|
|
833
857
|
const settings = {
|
|
834
858
|
timestampFormat: {
|
|
@@ -878,10 +902,11 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
878
902
|
}
|
|
879
903
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
880
904
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
905
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
881
906
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
882
907
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
883
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
884
|
-
const ErrorCtor =
|
|
908
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
909
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
885
910
|
const exception = new ErrorCtor(message);
|
|
886
911
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
887
912
|
const output = {};
|
|
@@ -1247,6 +1272,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1247
1272
|
constructor(options) {
|
|
1248
1273
|
super({
|
|
1249
1274
|
defaultNamespace: options.defaultNamespace,
|
|
1275
|
+
errorTypeRegistries: options.errorTypeRegistries,
|
|
1250
1276
|
});
|
|
1251
1277
|
this.options = options;
|
|
1252
1278
|
const settings = {
|
|
@@ -1323,6 +1349,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1323
1349
|
}
|
|
1324
1350
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1325
1351
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
1352
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1326
1353
|
const errorData = this.loadQueryError(dataObject) ?? {};
|
|
1327
1354
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
1328
1355
|
errorData.message = message;
|
|
@@ -1333,7 +1360,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1333
1360
|
};
|
|
1334
1361
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
|
|
1335
1362
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1336
|
-
const ErrorCtor =
|
|
1363
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1337
1364
|
const exception = new ErrorCtor(message);
|
|
1338
1365
|
const output = {
|
|
1339
1366
|
Type: errorData.Error.Type,
|
|
@@ -1384,6 +1411,9 @@ class AwsEc2QueryProtocol extends AwsQueryProtocol {
|
|
|
1384
1411
|
};
|
|
1385
1412
|
Object.assign(this.serializer.settings, ec2Settings);
|
|
1386
1413
|
}
|
|
1414
|
+
getShapeId() {
|
|
1415
|
+
return "aws.protocols#ec2Query";
|
|
1416
|
+
}
|
|
1387
1417
|
useNestedResult() {
|
|
1388
1418
|
return false;
|
|
1389
1419
|
}
|
|
@@ -1759,6 +1789,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
1759
1789
|
this.codec = new XmlCodec(settings);
|
|
1760
1790
|
this.serializer = new protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
|
|
1761
1791
|
this.deserializer = new protocols.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
|
|
1792
|
+
this.compositeErrorRegistry;
|
|
1762
1793
|
}
|
|
1763
1794
|
getPayloadCodec() {
|
|
1764
1795
|
return this.codec;
|
|
@@ -1788,6 +1819,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
1788
1819
|
}
|
|
1789
1820
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1790
1821
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
1822
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1791
1823
|
if (dataObject.Error && typeof dataObject.Error === "object") {
|
|
1792
1824
|
for (const key of Object.keys(dataObject.Error)) {
|
|
1793
1825
|
dataObject[key] = dataObject.Error[key];
|
|
@@ -1801,8 +1833,12 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
1801
1833
|
}
|
|
1802
1834
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
1803
1835
|
const ns = schema.NormalizedSchema.of(errorSchema);
|
|
1804
|
-
const message = dataObject.Error?.message ??
|
|
1805
|
-
|
|
1836
|
+
const message = dataObject.Error?.message ??
|
|
1837
|
+
dataObject.Error?.Message ??
|
|
1838
|
+
dataObject.message ??
|
|
1839
|
+
dataObject.Message ??
|
|
1840
|
+
"UnknownError";
|
|
1841
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1806
1842
|
const exception = new ErrorCtor(message);
|
|
1807
1843
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
1808
1844
|
const output = {};
|
|
@@ -1840,6 +1876,7 @@ exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol;
|
|
|
1840
1876
|
exports.JsonCodec = JsonCodec;
|
|
1841
1877
|
exports.JsonShapeDeserializer = JsonShapeDeserializer;
|
|
1842
1878
|
exports.JsonShapeSerializer = JsonShapeSerializer;
|
|
1879
|
+
exports.QueryShapeSerializer = QueryShapeSerializer;
|
|
1843
1880
|
exports.XmlCodec = XmlCodec;
|
|
1844
1881
|
exports.XmlShapeDeserializer = XmlShapeDeserializer;
|
|
1845
1882
|
exports.XmlShapeSerializer = XmlShapeSerializer;
|
|
@@ -2,6 +2,7 @@ import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
|
2
2
|
import { decorateServiceException } from "@smithy/smithy-client";
|
|
3
3
|
export class ProtocolLib {
|
|
4
4
|
queryCompat;
|
|
5
|
+
errorRegistry;
|
|
5
6
|
constructor(queryCompat = false) {
|
|
6
7
|
this.queryCompat = queryCompat;
|
|
7
8
|
}
|
|
@@ -37,30 +38,47 @@ export class ProtocolLib {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
|
|
40
|
-
let namespace = defaultNamespace;
|
|
41
41
|
let errorName = errorIdentifier;
|
|
42
42
|
if (errorIdentifier.includes("#")) {
|
|
43
|
-
[
|
|
43
|
+
[, errorName] = errorIdentifier.split("#");
|
|
44
44
|
}
|
|
45
45
|
const errorMetadata = {
|
|
46
46
|
$metadata: metadata,
|
|
47
47
|
$fault: response.statusCode < 500 ? "client" : "server",
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
if (!this.errorRegistry) {
|
|
50
|
+
throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
51
|
+
}
|
|
50
52
|
try {
|
|
51
|
-
const errorSchema = getErrorSchema?.(
|
|
53
|
+
const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ??
|
|
54
|
+
this.errorRegistry.getSchema(errorIdentifier);
|
|
52
55
|
return { errorSchema, errorMetadata };
|
|
53
56
|
}
|
|
54
57
|
catch (e) {
|
|
55
58
|
dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
56
|
-
const synthetic =
|
|
59
|
+
const synthetic = this.errorRegistry;
|
|
57
60
|
const baseExceptionSchema = synthetic.getBaseException();
|
|
58
61
|
if (baseExceptionSchema) {
|
|
59
62
|
const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
|
|
60
63
|
throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
|
|
61
64
|
}
|
|
62
|
-
|
|
65
|
+
const d = dataObject;
|
|
66
|
+
const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
|
|
67
|
+
throw this.decorateServiceException(Object.assign(new Error(message), {
|
|
68
|
+
name: errorName,
|
|
69
|
+
}, errorMetadata), dataObject);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
compose(composite, errorIdentifier, defaultNamespace) {
|
|
73
|
+
let namespace = defaultNamespace;
|
|
74
|
+
if (errorIdentifier.includes("#")) {
|
|
75
|
+
[namespace] = errorIdentifier.split("#");
|
|
63
76
|
}
|
|
77
|
+
const staticRegistry = TypeRegistry.for(namespace);
|
|
78
|
+
const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
|
|
79
|
+
composite.copyFrom(staticRegistry);
|
|
80
|
+
composite.copyFrom(defaultSyntheticRegistry);
|
|
81
|
+
this.errorRegistry = composite;
|
|
64
82
|
}
|
|
65
83
|
decorateServiceException(exception, additions = {}) {
|
|
66
84
|
if (this.queryCompat) {
|
package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { loadSmithyRpcV2CborErrorCode, SmithyRpcV2CborProtocol } from "@smithy/core/cbor";
|
|
2
|
-
import { NormalizedSchema
|
|
2
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import { ProtocolLib } from "../ProtocolLib";
|
|
4
4
|
export class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {
|
|
5
5
|
awsQueryCompatible;
|
|
6
6
|
mixin;
|
|
7
|
-
constructor({ defaultNamespace, awsQueryCompatible, }) {
|
|
8
|
-
super({ defaultNamespace });
|
|
7
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {
|
|
8
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
9
9
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
10
10
|
this.mixin = new ProtocolLib(this.awsQueryCompatible);
|
|
11
11
|
}
|
|
@@ -27,10 +27,11 @@ export class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {
|
|
|
27
27
|
}
|
|
28
28
|
return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
29
29
|
})();
|
|
30
|
+
this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
|
|
30
31
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
31
32
|
const ns = NormalizedSchema.of(errorSchema);
|
|
32
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
33
|
-
const ErrorCtor =
|
|
33
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
34
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
34
35
|
const exception = new ErrorCtor(message);
|
|
35
36
|
const output = {};
|
|
36
37
|
for (const [name, member] of ns.structIterator()) {
|
|
@@ -11,6 +11,8 @@ export * from "./json/awsExpectUnion";
|
|
|
11
11
|
export * from "./json/parseJsonBody";
|
|
12
12
|
export * from "./query/AwsEc2QueryProtocol";
|
|
13
13
|
export * from "./query/AwsQueryProtocol";
|
|
14
|
+
export * from "./query/QuerySerializerSettings";
|
|
15
|
+
export * from "./query/QueryShapeSerializer";
|
|
14
16
|
export * from "./xml/AwsRestXmlProtocol";
|
|
15
17
|
export * from "./xml/XmlCodec";
|
|
16
18
|
export * from "./xml/XmlShapeDeserializer";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
2
2
|
export class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
3
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
3
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
4
4
|
super({
|
|
5
5
|
defaultNamespace,
|
|
6
|
+
errorTypeRegistries,
|
|
6
7
|
serviceTarget,
|
|
7
8
|
awsQueryCompatible,
|
|
8
9
|
jsonCodec,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
2
2
|
export class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
3
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
3
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
4
4
|
super({
|
|
5
5
|
defaultNamespace,
|
|
6
|
+
errorTypeRegistries,
|
|
6
7
|
serviceTarget,
|
|
7
8
|
awsQueryCompatible,
|
|
8
9
|
jsonCodec,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import { deref, NormalizedSchema
|
|
2
|
+
import { deref, NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import { ProtocolLib } from "../ProtocolLib";
|
|
4
4
|
import { JsonCodec } from "./JsonCodec";
|
|
5
5
|
import { loadRestJsonErrorCode } from "./parseJsonBody";
|
|
@@ -10,9 +10,10 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
10
10
|
codec;
|
|
11
11
|
mixin;
|
|
12
12
|
awsQueryCompatible;
|
|
13
|
-
constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
13
|
+
constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {
|
|
14
14
|
super({
|
|
15
15
|
defaultNamespace,
|
|
16
|
+
errorTypeRegistries,
|
|
16
17
|
});
|
|
17
18
|
this.serviceTarget = serviceTarget;
|
|
18
19
|
this.codec =
|
|
@@ -54,10 +55,11 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
54
55
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
55
56
|
}
|
|
56
57
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
58
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
57
59
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
58
60
|
const ns = NormalizedSchema.of(errorSchema);
|
|
59
|
-
const message = dataObject.message ?? dataObject.Message ?? "
|
|
60
|
-
const ErrorCtor =
|
|
61
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
62
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
61
63
|
const exception = new ErrorCtor(message);
|
|
62
64
|
const output = {};
|
|
63
65
|
for (const [name, member] of ns.structIterator()) {
|