Skip to content

Commit 7109d5c

Browse files
authored
Make the conversion of Error to RedisError conform to RESP convention (#103)
By convention the first word of the error is an uppercase string indicating the type of error.
1 parent 0ea2982 commit 7109d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rediserror.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl RedisError {
1515

1616
impl<T: std::error::Error> From<T> for RedisError {
1717
fn from(e: T) -> Self {
18-
RedisError::String(e.to_string())
18+
RedisError::String(format!("ERR {}", e))
1919
}
2020
}
2121

0 commit comments

Comments
 (0)