@@ -137,15 +137,10 @@ def legacyActions(attribute_actions_on_encrypt):
137
137
except Exception as e :
138
138
return InternalLegacyOverride .CreateBuildFailure (InternalLegacyOverride .CreateError (str (e )))
139
139
140
- @staticmethod
141
140
def EncryptItem (self , input ):
142
141
"""Encrypt an item using the legacy DynamoDB encryptor.
143
142
144
- This is a static method that is called with the instance as the first parameter,
145
- allowing access to instance attributes while maintaining the expected signature.
146
-
147
143
Args:
148
- self: The InternalLegacyOverride instance
149
144
input: EncryptItemInput containing the plaintext item to encrypt
150
145
151
146
Returns:
@@ -173,20 +168,15 @@ def EncryptItem(self, input):
173
168
return Wrappers .Result_Success (output )
174
169
175
170
except Exception as e :
176
- # Return an appropriate error result
171
+ # Return an appropriate error result with the exception details
177
172
return Wrappers .Result_Failure (
178
- InternalLegacyOverride .CreateError (str (e ))
173
+ InternalLegacyOverride .CreateError (f"Error during encryption: { str (e )} " )
179
174
)
180
175
181
- @staticmethod
182
176
def DecryptItem (self , input ):
183
177
"""Decrypt an item using the legacy DynamoDB encryptor.
184
-
185
- This is a static method that is called with the instance as the first parameter,
186
- allowing access to instance attributes while maintaining the expected signature.
187
-
178
+
188
179
Args:
189
- self: The InternalLegacyOverride instance
190
180
input: DecryptItemInput containing the encrypted item to decrypt
191
181
192
182
Returns:
@@ -222,9 +212,9 @@ def DecryptItem(self, input):
222
212
return Wrappers .Result_Success (output )
223
213
224
214
except Exception as e :
225
- # Return an appropriate error result
215
+ # Return an appropriate error result with the exception details
226
216
return Wrappers .Result_Failure (
227
- InternalLegacyOverride .CreateError (str (e ))
217
+ InternalLegacyOverride .CreateError (f"Error during decryption: { str (e )} " )
228
218
)
229
219
230
220
def __init__ (self ):
0 commit comments