From 1bb1cab05fc93ad006f7d8ec8aa2b9a724d4b42c Mon Sep 17 00:00:00 2001 From: Will Leyton Date: Fri, 10 May 2024 17:37:19 -0500 Subject: [PATCH] Update --- .../adapter/out/persistence/sql/SqlProductRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/adapter/src/main/kotlin/com/leysoft/products/adapter/out/persistence/sql/SqlProductRepository.kt b/products/adapter/src/main/kotlin/com/leysoft/products/adapter/out/persistence/sql/SqlProductRepository.kt index da5a286..f29f09d 100644 --- a/products/adapter/src/main/kotlin/com/leysoft/products/adapter/out/persistence/sql/SqlProductRepository.kt +++ b/products/adapter/src/main/kotlin/com/leysoft/products/adapter/out/persistence/sql/SqlProductRepository.kt @@ -73,7 +73,7 @@ class SqlProductRepository private constructor() : val result = fold( block = { command(delById(id)).await() }, recover = { error: Jdbc.Companion.SqlException -> raise(DeleteProductException(error.message)) }, - catch = { _ -> raise(CreateProductException()) }, + catch = { _ -> raise(DeleteProductException()) }, transform = ::identity ) id.wasDeleted(result)