mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
@@ -27,12 +27,10 @@ extension AuthenticationError {
|
||||
var code: MatrixErrorCode {
|
||||
guard case let .Generic(message) = self else { return .unknown }
|
||||
|
||||
for code in MatrixErrorCode.allCases {
|
||||
if message.contains(code.rawValue) {
|
||||
return code
|
||||
}
|
||||
guard let first = MatrixErrorCode.allCases.first(where: { message.contains($0.rawValue) }) else {
|
||||
return .unknown
|
||||
}
|
||||
|
||||
return .unknown
|
||||
|
||||
return first
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user