2024-12-20 20:58:06 +00:00
|
|
|
/// Represents an error coming directly from the devrant API.
|
2024-12-15 19:52:03 +00:00
|
|
|
public struct DevRantApiError: Swift.Error {
|
|
|
|
let message: String
|
|
|
|
}
|
|
|
|
|
|
|
|
public extension DevRantApiError {
|
|
|
|
struct CodingData: Decodable, Swift.Error {
|
|
|
|
let error: String
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public extension DevRantApiError.CodingData {
|
|
|
|
var decoded: DevRantApiError {
|
|
|
|
.init(message: error)
|
|
|
|
}
|
|
|
|
}
|