swift-nio-redis
swift-nio-redis copied to clipboard
RESPError
when i set a value, i get a error
let loopGroup = MultiThreadedEventLoopGroup(numThreads: System.coreCount)
let option = RedisClientOptions(port: 6379, host: "127.0.0.1", password: "1234567", database: nil, eventLoopGroup: loopGroup)
let client = RedisClient(options: option)
client.set("aa", "11") { (error, esp) in
print(error)
print(esp)
}
it will print
nil
Optional(<Error: RESPError(_storage: NIORedis.RESPError.(_Storage in _00741320934968E7EEA61F1326A5517D))>)
Can you print:
error?.code
and
error?.message
(I also added a better debug description to the head version)
Since you are passing a password, I think that this is probably the issue. The lib doesn't support them right now.
@helje5 error is nil, respValue is "<Error: RESPError(_storage: NIORedis.RESPError.(_Storage in _00741320934968E7EEA61F1326A5517D))>"
client.set("aa", "11") { (error, resp) in
print(error) // nil
print(resp) // <Error: RESPError(_storage: NIORedis.RESPError.(_Storage in _00741320934968E7EEA61F1326A5517D))>
}
Oh right, sorry, I misread that. That is wrong for sure, I'll check.