@@ -137,15 +137,10 @@ def legacyActions(attribute_actions_on_encrypt):
137137 except Exception as e :
138138 return InternalLegacyOverride .CreateBuildFailure (InternalLegacyOverride .CreateError (str (e )))
139139
140- @staticmethod
141140 def EncryptItem (self , input ):
142141 """Encrypt an item using the legacy DynamoDB encryptor.
143142
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-
147143 Args:
148- self: The InternalLegacyOverride instance
149144 input: EncryptItemInput containing the plaintext item to encrypt
150145
151146 Returns:
@@ -173,20 +168,15 @@ def EncryptItem(self, input):
173168 return Wrappers .Result_Success (output )
174169
175170 except Exception as e :
176- # Return an appropriate error result
171+ # Return an appropriate error result with the exception details
177172 return Wrappers .Result_Failure (
178- InternalLegacyOverride .CreateError (str (e ))
173+ InternalLegacyOverride .CreateError (f"Error during encryption: { str (e )} " )
179174 )
180175
181- @staticmethod
182176 def DecryptItem (self , input ):
183177 """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+
188179 Args:
189- self: The InternalLegacyOverride instance
190180 input: DecryptItemInput containing the encrypted item to decrypt
191181
192182 Returns:
@@ -222,9 +212,9 @@ def DecryptItem(self, input):
222212 return Wrappers .Result_Success (output )
223213
224214 except Exception as e :
225- # Return an appropriate error result
215+ # Return an appropriate error result with the exception details
226216 return Wrappers .Result_Failure (
227- InternalLegacyOverride .CreateError (str (e ))
217+ InternalLegacyOverride .CreateError (f"Error during decryption: { str (e )} " )
228218 )
229219
230220 def __init__ (self ):
0 commit comments