File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed
templates/kotlin/src/main/kotlin/io/appwrite Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ class Client @JvmOverloads constructor(
449
449
450
450
@Suppress("UNCHECKED_CAST")
451
451
override fun onResponse(call: Call, response: Response) {
452
- if (! response.isSuccessful ) {
452
+ if (response.code < 300 || response.code >= 400 ) {
453
453
val body = response.body!!
454
454
.charStream()
455
455
.buffered()
Original file line number Diff line number Diff line change @@ -124,19 +124,14 @@ class ServiceTest {
124
124
125
125
general.empty()
126
126
127
- try {
128
- val url = general.oauth2(
129
- clientId = " clientId" ,
130
- scopes = listOf (" test" ),
131
- state = " 123456" ,
132
- success = " https://localhost" ,
133
- failure = " https://localhost" ,
134
- )
135
- writeToFile(url)
136
- } catch (e: Exception ) {
137
- writeToFile(" Was exception" )
138
- writeToFile(e.message)
139
- }
127
+ val url = general.oauth2(
128
+ clientId = " clientId" ,
129
+ scopes = listOf (" test" ),
130
+ state = " 123456" ,
131
+ success = " https://localhost" ,
132
+ failure = " https://localhost" ,
133
+ )
134
+ writeToFile(url)
140
135
141
136
// Query helper tests
142
137
writeToFile(Query .equal(" released" , listOf (true )))
You can’t perform that action at this time.
0 commit comments