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:
Florent CHAMPIGNY 2025-08-20 16:45:53 +02:00 committed by GitHub
parent cae29db95c
commit db3c8a118c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 491 additions and 191 deletions

View file

@ -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
}
}
}