diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs index f3e53c3..b5bb00b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs @@ -77,8 +77,9 @@ namespace Win_in.Sfs.Scp.WebApi } catch (Exception ex) { + var baseEx = ex.GetBaseException(); entity.ErrorCode = 1; - entity.ErrorMessage = ex.Message; + entity.ErrorMessage = baseEx.Message; } var ret = await _partRepository.InsertAsync(entity); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs index dba6271..e4b545e 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs @@ -81,8 +81,9 @@ namespace Win_in.Sfs.Scp.WebApi } catch (Exception ex) { + var baseEx = ex.GetBaseException(); entity.ErrorCode = 1; - entity.ErrorMessage = ex.Message; + entity.ErrorMessage = baseEx.Message; } var ret = await _purchaseOrderRepository.InsertAsync(entity); var dto = ObjectMapper.Map(ret); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs index 9d15950..1dc429c 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs @@ -80,8 +80,9 @@ namespace Win_in.Sfs.Scp.WebApi } catch (Exception ex) { + var baseEx = ex.GetBaseException(); entity.ErrorCode = 1; - entity.ErrorMessage = ex.Message; + entity.ErrorMessage = baseEx.Message; } var ret = await _receiptRepository.InsertAsync(entity); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs index 9b26f4d..2172970 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs @@ -76,8 +76,9 @@ namespace Win_in.Sfs.Scp.WebApi } catch (Exception ex) { + var baseEx = ex.GetBaseException(); entity.ErrorCode = 1; - entity.ErrorMessage = ex.Message; + entity.ErrorMessage = baseEx.Message; } var ret = await _supplierRepository.InsertAsync(entity); diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs index 4c56743..db6425e 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs @@ -79,8 +79,9 @@ namespace Win_in.Sfs.Scp.WebApi } catch (Exception ex) { + var baseEx = ex.GetBaseException(); entity.ErrorCode = 1; - entity.ErrorMessage = ex.Message; + entity.ErrorMessage = baseEx.Message; } diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs index 8df4237..ba0d68a 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs @@ -15,4 +15,9 @@ namespace Win_in.Sfs.Scp.WebApi LocalizationResource = typeof(WebApiResource); } } + + public static class ExceptionExtension + { + + } }