fixes and improvements
This commit is contained in:
@@ -46,8 +46,13 @@ class ResponseConverterFactory(private val converter: JsonConverter) : Converter
|
||||
return successModel
|
||||
},
|
||||
onFailure = { failure ->
|
||||
if(failure is JsonDataException) {
|
||||
throw failure
|
||||
if (failure is JsonDataException) {
|
||||
throw ApiException(
|
||||
RestApiError(
|
||||
errorCode = -1,
|
||||
errorMsg = failure.message.orEmpty()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
val isUnit = successType == Unit::class.java
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package dev.meloda.fast.network
|
||||
|
||||
enum class VkErrorCode(val code: Int) {
|
||||
WTF(-1),
|
||||
UNKNOWN_ERROR(1),
|
||||
APP_DISABLED(2),
|
||||
UNKNOWN_METHOD(3),
|
||||
|
||||
Reference in New Issue
Block a user