Skip to content

Write error as string if headers already sent

Eric Eastwood requested to merge feature/write-error-if-headers-sent into master

Write error as string if headers already sent

res.send() will try to change the header based on the Content-Type which will result in the following error Error: Can't set headers after they are sent.

Spawned from needed use with https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1199/diffs?diff_id=19401923

Merge request reports