Improve Swift error messaging in RN
Closed this issue · 0 comments
nplasterer commented
In the reaact native logs I only see : ERROR in create: [Error: The operation couldn't be completed. (XMTP.ClientError error 0.)] which is really not readable
When building through Xcode I can see more logs: 'ERROR in create: ', { [Error: The operation couldn't be completed. (XMTP.ClientError error 0.)] code: 'ERR_UNEXPECTED' } but still nothing clear
This error is thrown here :
xmtp-ios/Sources/XMTPiOS/Client.swift
Line 131 in 9ed0edf
If I add a print("ERROR (error)") above this line I do get : ERROR Storage(message: "Storage error: The SQLCipher Sqlite extension is not present, but an encryption key is given") so libxmtp does throw the right error but it’s not well surfaced in swift logs & RN logs. I’m adding the right linking to Converse to fix the issue but just know that for other devs it might really not be clear what the issue is