Closed yanecc closed 2 months ago
If you monkey patch in some pp ex
within the exception handler, is the actual exception this Closed stream
error? Is possible its trying to handle a different error originally that might make the problem more clear.
Possibly related? https://forum.crystal-lang.org/t/help-solving-io-error/130 I get this error ALL the time on every Lucky project I work on. I've never found what causes it, and I'm not sure if it actually affects anything or not.
The exception seems to be caused by the grip framework. It appears to be seting the status code in an error handler at a point where the response connection is already closed (ref. https://github.com/grip-framework/grip/blob/7dbfcde591659e29c21f91e2ed8620ed1748510a/src/grip/handlers/exception.cr#L16C9-L16C112).
I don't think there's anything actionable here. Please report this issue to grip.
If you need more help with debugging (the original error is overshadowed by this bug in the error handler) please consult https://forum.crystal-lang.org/
I'm not sure whether it's a problem within crystal.
I made some changes to grip that I think was harmless. When I try to access static resources by routes, it works as expected but with an unhandled exception.
My fork: https://github.com/yanecc/grip