Open chrissound opened 1 month ago
Hm, I don't think there's a way to disable error
from crashing the app, are you sure you're hitting the right endpoint?
Yup 99% sure. This unexpected behavior does not to happen on the latest release (scotty 0.22 from hackage), so it's fixed there but broken likely for some versions prior.
If you're familiar with nix I have a full minimal example here: https://github.com/chrissound/scotty-error-issue
It seems 0.20 and 0.21 is affected as well. One good thing is it's fixed now already, actually I'm not sure if this github issue should remain open in that case. At least it's documented.
so, we did in fact overhaul exceptions handling in recent versions but I don't see how error would be affected.
Are you perhaps able to replicate? I tried creating a failing test case for this, but didn't have much luck. I also tried creating a github action a moment ago but for some reason the whole body response isn't even appearing https://github.com/chrissound/scotty-error-issue/actions/runs/10497035641/job/29078973137 :/
I think it was output buffering being an issue on my previous github action. None the less I'm able to replicate this finally on: https://github.com/chrissound/scotty-error-issue/actions/runs/10507995937/job/29110936575#step:4:808
I wonder if it's perhaps an issue related to output buffering in the first place though? In any case adding
hSetBuffering stdin NoBuffering
hSetBuffering stdout NoBuffering
Does not fix it locally or on github actions.
Previously in scotty-0.12.1 this would have printed something like:
But now there is literally no output