mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-14 18:33:24 +00:00
Feat badnetwork exeptions (#122)
* feat: [BADNETWORK] exceptions * added errors on okhttp * added errors on okhttp * feat: [BADNETWORK] exceptions * feat: [BADNETWORK] exceptions --------- Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
cae29db95c
commit
db3c8a118c
13 changed files with 491 additions and 191 deletions
|
|
@ -12,8 +12,17 @@ data class BadQualityConfig(
|
|||
)
|
||||
class Error(
|
||||
val weight: Float, // increase the probability of being triggered vs all others errors
|
||||
val errorCode: Int,
|
||||
val errorBody: String,
|
||||
val errorContentType: String, // "application/json"
|
||||
)
|
||||
val type: Type,
|
||||
) {
|
||||
sealed interface Type {
|
||||
data class Body(
|
||||
val errorCode: Int,
|
||||
val errorBody: String,
|
||||
val errorContentType: String, // "application/json"
|
||||
) : Type
|
||||
data class ErrorThrow(
|
||||
val classPath: String,
|
||||
) : Type
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue