17 lines
378 B
Swift
Raw Normal View History

/// Represents an error coming directly from the devrant API.
public struct DevRantApiError: Swift.Error {
2024-12-22 16:24:48 +00:00
public let message: String
}
public extension DevRantApiError {
struct CodingData: Decodable, Swift.Error {
let error: String
}
}
public extension DevRantApiError.CodingData {
var decoded: DevRantApiError {
.init(message: error)
}
}