File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ export default function render(url, res) {
28
28
res . setHeader ( 'Content-type' , 'text/html' ) ;
29
29
pipe ( res ) ;
30
30
} ,
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
+ } ,
31
36
onError ( x ) {
32
37
didError = true ;
33
38
console . error ( x ) ;
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ module.exports = function render(url, res) {
49
49
res . setHeader ( 'Content-type' , 'text/html' ) ;
50
50
pipe ( res ) ;
51
51
} ,
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
+ } ,
52
57
onError ( x ) {
53
58
didError = true ;
54
59
console . error ( x ) ;
You can’t perform that action at this time.
0 commit comments