File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator/views Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class ClientApiModule < View
44
44
'box' => false ,
45
45
'fault' => false ,
46
46
'error' => false ,
47
+ 'exception_event' => false , # internal, exceptions cannot be events
47
48
'deprecated' => false ,
48
49
'deprecatedMessage' => false ,
49
50
'type' => false ,
Original file line number Diff line number Diff line change @@ -28,14 +28,13 @@ def module_name
28
28
29
29
# @return [Array<StructClass>]
30
30
def structures
31
- unless @service . protocol_settings . empty?
32
- if @service . protocol_settings [ 'h2' ] == 'eventstream'
33
- @service . api [ 'shapes' ] . each do |_ , shape |
34
- if shape [ 'eventstream' ]
35
- # add event trait to all members if not exists
36
- shape [ 'members' ] . each do |name , ref |
37
- @service . api [ 'shapes' ] [ ref [ 'shape' ] ] [ 'event' ] = true
38
- end
31
+ @service . api [ 'shapes' ] . each do |_ , shape |
32
+ if shape [ 'eventstream' ]
33
+ # add internal exception_event ctrait to all exceptions
34
+ # exceptions will not have the event trait.
35
+ shape [ 'members' ] . each do |name , ref |
36
+ if !!@service . api [ 'shapes' ] [ ref [ 'shape' ] ] [ 'exception' ]
37
+ @service . api [ 'shapes' ] [ ref [ 'shape' ] ] [ 'exception_event' ] = true
39
38
end
40
39
end
41
40
end
@@ -93,7 +92,7 @@ def struct_members(shape)
93
92
sensitive : sensitive
94
93
)
95
94
end
96
- if shape [ 'event' ]
95
+ if shape [ 'event' ] || shape [ 'exception_event' ]
97
96
members << StructMember . new ( member_name : 'event_type' )
98
97
end
99
98
members
Original file line number Diff line number Diff line change 1
1
Unreleased Changes
2
2
------------------
3
3
4
+ * Issue - Fix exception handling with event streaming operations.
5
+
4
6
1.1.0 (2023-10-02)
5
7
------------------
6
8
Original file line number Diff line number Diff line change 1
1
Unreleased Changes
2
2
------------------
3
3
4
+ * Issue - Fix exception handling with event streaming operations.
5
+
4
6
1.56.0 (2023-09-27)
5
7
------------------
6
8
You can’t perform that action at this time.
0 commit comments