Investigate options for handling writes to closed responses
Current Behaviour
BL puts timeouts on routes and model processors and correctly sends an error back, but it does nothing to either stop the execution of the function that timeout or gracefully handle if that timedout function tries to send something on the already committed and ended response. It's left up to the implementer to check if the response is still open, which is an often overlooked step in the dev process.
Task
Evaluate whether anything can be done at the core level to catch and gracefully these errors.
Some possible options:
- Error handling hooking in the express API?
- Overwriting the writing functions on the response when the response is committed.