forked from melod1n/fast-messenger
Release 0.1.7 (#136)
* Bump haze from 1.1.1 to 1.2.0 (#105) * Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.3 to 1.8.0 (#104) * update gradle wrapper * Bump agp from 8.7.3 to 8.8.0 (#106) * Bump com.jraska.module.graph.assertion from 2.7.1 to 2.7.3 (#109) * Bump haze from 1.2.0 to 1.2.2 (#111) * Bump koin from 4.0.1 to 4.0.2 (#112) * little improvement * Bump kotlin from 2.1.0 to 2.1.10 (#113) * Bump androidx.compose:compose-bom from 2024.12.01 to 2025.02.00 (#115) * Bump androidx.navigation:navigation-compose from 2.8.5 to 2.8.7 (#119) * Bump haze from 1.2.2 to 1.3.1 (#118) * Bump ksp from 2.1.0-1.0.29 to 2.1.10-1.0.30 (#116) * Bump agp from 8.8.0 to 8.8.1 (#117) * Bump com.google.accompanist:accompanist-permissions (#121) * Rename the app's namespace and applicationId to `dev.meloda.fastvk`, and update the package name in `ACTION_MANAGE_UNKNOWN_APP_SOURCES` intent. Remove unnecessary `onLowMemory` method in the `OnlineService`. * Bump com.jraska.module.graph.assertion from 2.7.3 to 2.8.0 (#126) * Bump ksp from 2.1.10-1.0.30 to 2.1.10-1.0.31 (#125) * Bump haze from 1.3.1 to 1.4.0 (#124) * Bump agp from 8.8.1 to 8.8.2 (#123) * Bump androidx.navigation:navigation-compose from 2.8.7 to 2.8.8 (#122) * Bump haze from 1.4.0 to 1.5.0 (#128) * Bump agp from 8.8.2 to 8.9.0 (#127) * Bump androidx.navigation:navigation-compose from 2.8.8 to 2.8.9 (#130) * Bump androidx.compose:compose-bom from 2025.02.00 to 2025.03.00 (#129) * revert agp version to 8.8.2 * fix issues with package names * Bump haze from 1.5.0 to 1.5.1 (#133) * Bump com.google.guava:guava from 33.4.0-jre to 33.4.5-jre (#132) * russian translations * fixes and improvements --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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),
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.slack.eithernet.integration.retrofit.ApiResultCallAdapterFactory
|
||||
import com.slack.eithernet.integration.retrofit.ApiResultConverterFactory
|
||||
import com.squareup.moshi.Moshi
|
||||
import dev.meloda.fast.common.AppConstants
|
||||
import dev.meloda.fast.common.model.LogLevel
|
||||
import dev.meloda.fast.datastore.AppSettings
|
||||
import dev.meloda.fast.network.JsonConverter
|
||||
import dev.meloda.fast.network.MoshiConverter
|
||||
@@ -57,12 +56,8 @@ val networkModule = module {
|
||||
.followSslRedirects(true)
|
||||
.addInterceptor(
|
||||
HttpLoggingInterceptor().apply {
|
||||
level = when (AppSettings.Debug.networkLogLevel) {
|
||||
LogLevel.NONE -> HttpLoggingInterceptor.Level.NONE
|
||||
LogLevel.BASIC -> HttpLoggingInterceptor.Level.BASIC
|
||||
LogLevel.HEADERS -> HttpLoggingInterceptor.Level.HEADERS
|
||||
LogLevel.BODY -> HttpLoggingInterceptor.Level.BODY
|
||||
}
|
||||
level =
|
||||
HttpLoggingInterceptor.Level.entries[AppSettings.Debug.networkLogLevel.ordinal]
|
||||
}
|
||||
)
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user