File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed
templates/android/library/src/main/java/io/appwrite Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,11 @@ class Client @JvmOverloads constructor(
314314
315315 val contentType: String = response.headers["content-type"] ?: ""
316316 val error = if (contentType.contains("application/json", ignoreCase = true)) {
317- bodyString.fromJson< {{ spec . title | caseUcfirst }}Exception> ()
317+ bodyString.fromJson()
318318 } else {
319319 {{ spec .title | caseUcfirst }}Exception(bodyString, response.code)
320320 }
321-
322- it.cancel(AppwriteException(
323- error.message,
324- error.code,
325- bodyString
326- ))
321+ it.cancel(error)
327322 }
328323 it.resume(response)
329324 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package {{ sdk.namespace | caseDot }}.exceptions
33import java.lang.Exception
44
55class {{spec .title | caseUcfirst }}Exception(
6- message: String? = null,
6+ override val message: String? = null,
77 val code: Int? = null,
88 val response: String? = null
99) : Exception(message)
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class SDKTest extends TestCase
7979 'envs ' => [
8080 'java-8 ' => 'docker run --rm -v $(pwd):/app -w /app/tests/sdks/android alvrme/alpine-android:latest-jdk8 sh -c "./gradlew :library:testReleaseUnitTest -q && cat library/result.txt" ' ,
8181 ],
82- 'supportException ' => false ,
82+ 'supportException ' => true ,
8383 'supportRealtime ' => true ,
8484 ],
8585
You can’t perform that action at this time.
0 commit comments