Bimba.git

ref: cd9eab45c3027f79bb9e9773ad4a6862c36c7b81

app/src/main/java/xyz/apiote/bimba/czwek/repo/TrafficResponseException.kt


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: Adam Evyčędo
//
// SPDX-License-Identifier: GPL-3.0-or-later

package xyz.apiote.bimba.czwek.repo

import xyz.apiote.bimba.czwek.api.Error
import xyz.apiote.bimba.czwek.api.mapHttpError

class TrafficResponseException(code: Int, msg: String, val error: Error) :
	Exception("Error response with code $code: $msg") {

	constructor(code: Int) : this(
		code,
		"",
		Error(code, mapHttpError(code).first, mapHttpError(code).second)
	)
}