feat: Update API versioning and parser handling for improved schedule updates and error management
This commit is contained in:
@@ -22,8 +22,11 @@ import java.util.concurrent.TimeUnit
|
||||
*/
|
||||
class ApiException(message: String, val offline: Boolean = false, val code: String? = null) : Exception(message)
|
||||
|
||||
/** Server codes after which trying again later can help. */
|
||||
private val SOURCE_DOWN = setOf("source_unavailable", "source_timeout", "busy")
|
||||
/**
|
||||
* Server codes after which trying again later can help: the university is down or slow, the
|
||||
* server is busy or did not answer in time, or this address sent too many requests.
|
||||
*/
|
||||
private val SOURCE_DOWN = setOf("source_unavailable", "source_timeout", "busy", "timeout", "too_many_requests")
|
||||
|
||||
val json = Json {
|
||||
ignoreUnknownKeys = true
|
||||
|
||||
Reference in New Issue
Block a user