Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 065cd04

Browse files
committed
Include Type() in Exception message of unknown Type
1 parent 358308e commit 065cd04

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ public string Type(string key)
391391

392392
public RedisKeyType GetEntryType(string key)
393393
{
394-
switch (Type(key))
394+
var type = Type(key);
395+
switch (type)
395396
{
396397
case "none":
397398
return RedisKeyType.None;
@@ -406,7 +407,7 @@ public RedisKeyType GetEntryType(string key)
406407
case "hash":
407408
return RedisKeyType.Hash;
408409
}
409-
throw CreateResponseError("Invalid value");
410+
throw CreateResponseError($"Invalid Type '{type}'");
410411
}
411412

412413
public long StrLen(string key)

0 commit comments

Comments
 (0)