@@ -174,7 +174,13 @@ async def update_wallet(
174174 )
175175 if wallet .write is False :
176176 raise WalletAccessForbiddenError (
177- reason = f"Wallet { wallet_id } does not have write permission"
177+ reason = f"Wallet { wallet_id } does not have write permission" ,
178+ user_id = user_id ,
179+ wallet_id = wallet_id ,
180+ product_name = product_name ,
181+ user_acces_rights_on_wallet = wallet .dict (
182+ include = {"read" , "write" , "delete" }
183+ ),
178184 )
179185
180186 wallet_db : WalletDB = await db .update_wallet (
@@ -202,7 +208,13 @@ async def delete_wallet(
202208 )
203209 if wallet .delete is False :
204210 raise WalletAccessForbiddenError (
205- reason = f"Wallet { wallet_id } does not have delete permission"
211+ reason = f"Wallet { wallet_id } does not have delete permission" ,
212+ user_id = user_id ,
213+ wallet_id = wallet_id ,
214+ product_name = product_name ,
215+ user_acces_rights_on_wallet = wallet .dict (
216+ include = {"read" , "write" , "delete" }
217+ ),
206218 )
207219
208220 raise NotImplementedError
@@ -219,7 +231,13 @@ async def get_wallet_by_user(
219231 )
220232 if wallet .read is False :
221233 raise WalletAccessForbiddenError (
222- reason = f"User { user_id } does not have read permission on wallet { wallet_id } "
234+ reason = f"User { user_id } does not have read permission on wallet { wallet_id } " ,
235+ user_id = user_id ,
236+ wallet_id = wallet_id ,
237+ product_name = product_name ,
238+ user_acces_rights_on_wallet = wallet .dict (
239+ include = {"read" , "write" , "delete" }
240+ ),
223241 )
224242
225243 wallet_api : WalletGet = WalletGet (
0 commit comments