16 lines
221 B
Swift
16 lines
221 B
Swift
|
import Foundation
|
||
|
|
||
|
struct ErrorResponse: Codable, Identifiable {
|
||
|
var id: String {
|
||
|
error
|
||
|
}
|
||
|
|
||
|
let error: String
|
||
|
}
|
||
|
|
||
|
enum RocketChatError: Error {
|
||
|
case server(response: ErrorResponse)
|
||
|
case unauthorized
|
||
|
case unknown
|
||
|
}
|