ref: 7774775687ba51875638b7f5ec8932c1b63cee8d
app/src/main/java/xyz/apiote/bimba/czwek/api/responses/UnknownResponseVersion.kt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
package xyz.apiote.bimba.czwek.api import xyz.apiote.fruchtfleisch.Reader import java.io.InputStream class UnknownResponseVersion(resource: String, version: ULong) : Exception("Unknown resource $resource in version $version") data class ErrorResponse(val field: String, val message: String) { companion object { fun unmarshal(stream: InputStream): ErrorResponse { val reader = Reader(stream) return ErrorResponse(reader.readString(), reader.readString()) } } } |