File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ export default function render(url, res) {
2828 res . setHeader ( 'Content-type' , 'text/html' ) ;
2929 pipe ( res ) ;
3030 } ,
31+ onErrorShell ( x ) {
32+ // Something errored before we could complete the shell so we emit an alternative shell.
33+ res . statusCode = 500 ;
34+ res . send ( '<!doctype><p>Error</p>' ) ;
35+ } ,
3136 onError ( x ) {
3237 didError = true ;
3338 console . error ( x ) ;
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ module.exports = function render(url, res) {
4949 res . setHeader ( 'Content-type' , 'text/html' ) ;
5050 pipe ( res ) ;
5151 } ,
52+ onErrorShell ( x ) {
53+ // Something errored before we could complete the shell so we emit an alternative shell.
54+ res . statusCode = 500 ;
55+ res . send ( '<!doctype><p>Error</p>' ) ;
56+ } ,
5257 onError ( x ) {
5358 didError = true ;
5459 console . error ( x ) ;
You can’t perform that action at this time.
0 commit comments