aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-03-09 01:48:38 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-03-09 01:48:38 -0500
commitcd1daadaeaa6ffbaaef3ed25452decd90d01fdfc (patch)
tree51252a42ccf3f6eb860e42d83f064a7247d7ebf7 /lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs
parent5edcd9b03532823c71fd337e39b7f03fe2ea174e (diff)
Omega cache, session, and account provider complete overhaul
Diffstat (limited to 'lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs')
-rw-r--r--lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs b/lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs
index 6e79b8c..32f9a0e 100644
--- a/lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs
+++ b/lib/VNLib.Data.Caching.Extensions/src/FBMDataCacheExtensions.cs
@@ -30,6 +30,7 @@ using System.Security;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
+using System.Collections.Generic;
using System.Security.Cryptography;
using System.Runtime.CompilerServices;
@@ -44,7 +45,7 @@ using VNLib.Utils.Extensions;
using VNLib.Net.Rest.Client;
using VNLib.Net.Messaging.FBM;
using VNLib.Net.Messaging.FBM.Client;
-using System.Collections.Generic;
+
namespace VNLib.Data.Caching.Extensions
{
@@ -226,10 +227,7 @@ namespace VNLib.Data.Caching.Extensions
using ClientContract cc = ClientPool.Lease();
//Exec the regitration request
RestResponse response = await cc.Resource.ExecutePutAsync(regRequest);
- if(!response.IsSuccessful)
- {
- throw response.ErrorException!;
- }
+ response.ThrowIfError();
}
@@ -386,12 +384,8 @@ namespace VNLib.Data.Caching.Extensions
{
//Execute the request
RestResponse response = await clientContract.Resource.ExecuteGetAsync(negotation, token);
-
- //Check verify the response
- if (!response.IsSuccessful)
- {
- throw response.ErrorException!;
- }
+
+ response.ThrowIfError();
if (response.Content == null)
{