aws-sdk-core 3.226.1 → 3.226.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2ca0fbdedab1c093c716160e76303794d1546fb910732e7399158149393379d
4
- data.tar.gz: 80287b842e9382353bb5c5093495299d8bfefaa4c1ca41227e34eeb2cb0ee592
3
+ metadata.gz: ff2de592e80a44bf7dc7d79b6d10dfbda7fbe4b747b197ba62b448aa7740f829
4
+ data.tar.gz: 23b3577fd71b333470307184eba75cc98ce0d5e632e969858d84d5b7c7bb35ae
5
5
  SHA512:
6
- metadata.gz: 95520dcd178c17ffee6588d5c840dcab71184746d1b3b9262de70a43a9fb2fb43ba0e773c6d4dcf08cdc0fc7639b407a644050e002edf34dc288077577e2577a
7
- data.tar.gz: 963666144b4c5f8f9826a667060e371b73772fa3fae57066cbcac775bc8a56a6e12350984bce5241a90e53d8e29f95e6be78b472c53a319af6b56b15a51f3bc3
6
+ metadata.gz: 878a8d0aedb4e05adbef96853e46a74c43725157ac1db162f6a897d3a14c9a52194ee3e7c1c56f2a0f78ae396f07fdec75227cf728715a29ce6b3c6f28111afb
7
+ data.tar.gz: d86248a04930fbe1f67981e0798bfd78ca72ff4179b709511b055b0a1510043d323bce1bfa7c73f3698ba17d53fd0ac57cfabc48842499e6f34c49e26590cac0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.226.2 (2025-07-01)
5
+ ------------------
6
+
7
+ * Issue - Document incorrect behavior in protocol error parsing (specifically around query and query compatible services).
8
+
4
9
  3.226.1 (2025-06-24)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.226.1
1
+ 3.226.2
@@ -1,12 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aws
4
+ # @api private
4
5
  class ErrorHandler < Seahorse::Client::Handler
5
6
 
6
7
  private
7
8
 
8
9
  def error(context)
9
10
  body = context.http_response.body_contents
11
+ # This is not correct per protocol tests. Some headers will determine the error code.
12
+ # If the body is empty, there is still potentially an error code from the header, but
13
+ # we are making a generic http status error instead. In a new major version, we should
14
+ # always try to extract header, and during extraction, check headers and body.
10
15
  if body.empty?
11
16
  code, message, data = http_status_error(context)
12
17
  else
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Aws
4
4
  module Json
5
+ # @api private
5
6
  class ErrorHandler < Aws::ErrorHandler
6
7
 
7
8
  def call(context)
@@ -24,18 +25,21 @@ module Aws
24
25
  end
25
26
 
26
27
  def error_code(json, context)
28
+ # This is not correct per protocol tests. awsQueryError is intended to populate the
29
+ # error code of the error class. The error class should come from __type. Query and
30
+ # query compatible services currently have dynamic errors raised from error codes instead
31
+ # of the modeled error class. However, changing this in this major version would break
32
+ # existing usage.
27
33
  code =
28
34
  if aws_query_error?(context)
29
- query_header = context.http_response.headers['x-amzn-query-error']
30
- error, _type = query_header.split(';') # type not supported
31
- remove_prefix(error, context)
35
+ aws_query_error_code(context)
32
36
  else
33
37
  json['__type']
34
38
  end
35
39
  code ||= json['code']
36
40
  code ||= context.http_response.headers['x-amzn-errortype']
37
41
  if code
38
- code.split('#').last
42
+ code.split('#').last.split(':').first
39
43
  else
40
44
  http_status_error_code(context)
41
45
  end
@@ -46,6 +50,12 @@ module Aws
46
50
  context.http_response.headers['x-amzn-query-error']
47
51
  end
48
52
 
53
+ def aws_query_error_code(context)
54
+ query_header = context.http_response.headers['x-amzn-query-error']
55
+ error, _type = query_header.split(';') # type not supported
56
+ remove_prefix(error, context)
57
+ end
58
+
49
59
  def remove_prefix(error_code, context)
50
60
  if (prefix = context.config.api.metadata['errorPrefix'])
51
61
  error_code.sub(/^#{prefix}/, '')
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Aws
4
4
  module RpcV2
5
+ # @api private
5
6
  class ErrorHandler < Aws::ErrorHandler
6
7
 
7
8
  def call(context)
@@ -37,11 +38,14 @@ module Aws
37
38
  end
38
39
 
39
40
  def error_code(data, context)
41
+ # This is not correct per protocol tests. awsQueryError is intended to populate the
42
+ # error code of the error class. The error class should come from __type. Query and
43
+ # query compatible services currently have dynamic errors raised from error codes instead
44
+ # of the modeled error class. However, changing this in this major version would break
45
+ # existing usage.
40
46
  code =
41
47
  if aws_query_error?(context)
42
- query_header = context.http_response.headers['x-amzn-query-error']
43
- error, _type = query_header.split(';') # type not supported
44
- remove_prefix(error, context)
48
+ aws_query_error_code(context)
45
49
  else
46
50
  data['__type']
47
51
  end
@@ -52,6 +56,25 @@ module Aws
52
56
  end
53
57
  end
54
58
 
59
+ def aws_query_error?(context)
60
+ context.config.api.metadata['awsQueryCompatible'] &&
61
+ context.http_response.headers['x-amzn-query-error']
62
+ end
63
+
64
+ def aws_query_error_code(context)
65
+ query_header = context.http_response.headers['x-amzn-query-error']
66
+ error, _type = query_header.split(';') # type not supported
67
+ remove_prefix(error, context)
68
+ end
69
+
70
+ def remove_prefix(error_code, context)
71
+ if (prefix = context.config.api.metadata['errorPrefix'])
72
+ error_code.sub(/^#{prefix}/, '')
73
+ else
74
+ error_code
75
+ end
76
+ end
77
+
55
78
  def parse_error_data(context, body, code)
56
79
  data = EmptyStructure.new
57
80
  if (error_rules = context.operation.errors)
@@ -67,19 +90,6 @@ module Aws
67
90
  end
68
91
  data
69
92
  end
70
-
71
- def aws_query_error?(context)
72
- context.config.api.metadata['awsQueryCompatible'] &&
73
- context.http_response.headers['x-amzn-query-error']
74
- end
75
-
76
- def remove_prefix(error_code, context)
77
- if (prefix = context.config.api.metadata['errorPrefix'])
78
- error_code.sub(/^#{prefix}/, '')
79
- else
80
- error_code
81
- end
82
- end
83
93
  end
84
94
  end
85
95
  end
@@ -5,6 +5,7 @@ require "cgi/util" if RUBY_VERSION < "3.5"
5
5
 
6
6
  module Aws
7
7
  module Xml
8
+ # @api private
8
9
  class ErrorHandler < Aws::ErrorHandler
9
10
 
10
11
  def call(context)
@@ -691,7 +691,7 @@ module Aws::SSO
691
691
  tracer: tracer
692
692
  )
693
693
  context[:gem_name] = 'aws-sdk-core'
694
- context[:gem_version] = '3.226.1'
694
+ context[:gem_version] = '3.226.2'
695
695
  Seahorse::Client::Request.new(handlers, context)
696
696
  end
697
697
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.226.1'
59
+ GEM_VERSION = '3.226.2'
60
60
 
61
61
  end
62
62
 
@@ -1061,7 +1061,7 @@ module Aws::SSOOIDC
1061
1061
  tracer: tracer
1062
1062
  )
1063
1063
  context[:gem_name] = 'aws-sdk-core'
1064
- context[:gem_version] = '3.226.1'
1064
+ context[:gem_version] = '3.226.2'
1065
1065
  Seahorse::Client::Request.new(handlers, context)
1066
1066
  end
1067
1067
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.226.1'
59
+ GEM_VERSION = '3.226.2'
60
60
 
61
61
  end
62
62
 
@@ -2594,7 +2594,7 @@ module Aws::STS
2594
2594
  tracer: tracer
2595
2595
  )
2596
2596
  context[:gem_name] = 'aws-sdk-core'
2597
- context[:gem_version] = '3.226.1'
2597
+ context[:gem_version] = '3.226.2'
2598
2598
  Seahorse::Client::Request.new(handlers, context)
2599
2599
  end
2600
2600
 
@@ -43,7 +43,6 @@ module Aws::STS
43
43
  #
44
44
  # Additionally, error classes are dynamically generated for service errors based on the error code
45
45
  # if they are not defined above.
46
- # Some existing error classes may use a different class name than the one documented.
47
46
  module Errors
48
47
 
49
48
  extend Aws::Errors::DynamicErrors
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.226.1'
59
+ GEM_VERSION = '3.226.2'
60
60
 
61
61
  end
62
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.226.1
4
+ version: 3.226.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services