rjaros / kvision

Object oriented web framework for Kotlin/JS
https://kvision.io
MIT License
1.2k stars 67 forks source link

Error at 204 response handling #435

Closed scapemb closed 1 year ago

scapemb commented 1 year ago

Rest client cannot handle code 204 response without a body

Logs:

kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js?7a42:7146 TypeError: Failed to execute 'text' on 'Response': body stream already read
    at $parseErrorsCOROUTINE$15.doResume_5yljmg_k$ (project.js?51e0:11277:1)
    at parseErrors (project.js?51e0:11117:1)
    at $makeApiCallCOROUTINE$14.doResume_5yljmg_k$ (project.js?51e0:11216:1)
    at CoroutineImpl.resumeWith_7onugl_k$ (kotlin-kotlin-stdlib-js-ir.js?46ac:24953:1)
    at CoroutineImpl.resumeWith_s3a3yh_k$ (kotlin-kotlin-stdlib-js-ir.js?46ac:25003:1)
    at DispatchedTask.run_mw4iiu_k$ (kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js?7a42:5368:1)
    at MessageQueue.process_mza50i_k$ (kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js?7a42:7454:1)
    at eval (kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js?7a42:7560:1)
rjaros commented 1 year ago

Fixed in 5.15.0