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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/error_handler.rb +5 -0
- data/lib/aws-sdk-core/json/error_handler.rb +14 -4
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +26 -16
- data/lib/aws-sdk-core/xml/error_handler.rb +1 -0
- data/lib/aws-sdk-sso/client.rb +1 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +1 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/aws-sdk-sts/errors.rb +0 -1
- data/lib/aws-sdk-sts.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff2de592e80a44bf7dc7d79b6d10dfbda7fbe4b747b197ba62b448aa7740f829
|
4
|
+
data.tar.gz: 23b3577fd71b333470307184eba75cc98ce0d5e632e969858d84d5b7c7bb35ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
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
|
-
|
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
|
-
|
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
|
data/lib/aws-sdk-sso/client.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
data/lib/aws-sdk-sts/errors.rb
CHANGED
@@ -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