Skip to content

Commit 8f2f992

Browse files
committed
fix(commonMain/api): issue where server sends non-zero Content-Length HTTP 204 response
Signed-off-by: aimok04 <aimok04@mailbox.org>
1 parent aadd735 commit 8f2f992

File tree

1 file changed

+1
-2
lines changed
  • composeApp/src/commonMain/kotlin/de/kitshn/api/tandoor/model/recipe

1 file changed

+1
-2
lines changed

composeApp/src/commonMain/kotlin/de/kitshn/api/tandoor/model/recipe/TandoorRecipe.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import kotlinx.serialization.json.buildJsonObject
3535
import kotlinx.serialization.json.decodeFromJsonElement
3636
import kotlinx.serialization.json.jsonPrimitive
3737
import kotlinx.serialization.json.put
38-
import okio.ProtocolException
3938

4039
@Serializable
4140
class TandoorRecipe(
@@ -166,7 +165,7 @@ class TandoorRecipe(
166165
})
167166
if(servings != null) put("servings", servings)
168167
})
169-
}catch(ex: ProtocolException) {
168+
} catch (ex: Exception) {
170169
// prevent HTTP 204 had non-zero Content-Length exception
171170
if(ex.message?.contains("HTTP 204") == true) return
172171
throw ex

0 commit comments

Comments
 (0)