@@ -179,11 +179,8 @@ test.describe("Error Sanitization", () => {
179179 expect ( html ) . toMatch ( "Index Error" ) ;
180180 expect ( html ) . not . toMatch ( "LOADER" ) ;
181181 expect ( html ) . toMatch ( "MESSAGE:Unexpected Server Error" ) ;
182- // This is the turbo-stream encoding - the fact that stack goes right
183- // into __type means it has no value
184- expect ( html ) . toMatch (
185- '\\"message\\",\\"Unexpected Server Error\\",\\"stack\\",\\"__type\\",\\"Error\\"' ,
186- ) ;
182+ expect ( html ) . toMatch ( '\\"SanitizedError\\"' ) ;
183+ expect ( html ) . toMatch ( '\\"Error\\",\\"Unexpected Server Error\\"' ) ;
187184 expect ( html ) . not . toMatch ( / a t / i) ;
188185 expect ( errorLogs . length ) . toBe ( 1 ) ;
189186 expect ( errorLogs [ 0 ] [ 0 ] . message ) . toMatch ( "Loader Error" ) ;
@@ -195,11 +192,8 @@ test.describe("Error Sanitization", () => {
195192 let html = await response . text ( ) ;
196193 expect ( html ) . toMatch ( "Index Error" ) ;
197194 expect ( html ) . toMatch ( "MESSAGE:Unexpected Server Error" ) ;
198- // This is the turbo-stream encoding - the fact that stack goes right
199- // into __type means it has no value
200- expect ( html ) . toMatch (
201- '\\"message\\",\\"Unexpected Server Error\\",\\"stack\\",\\"__type\\",\\"Error\\"' ,
202- ) ;
195+ expect ( html ) . toMatch ( '\\"SanitizedError\\"' ) ;
196+ expect ( html ) . toMatch ( '\\"Error\\",\\"Unexpected Server Error\\"' ) ;
203197 expect ( html ) . not . toMatch ( / a t / i) ;
204198 expect ( errorLogs . length ) . toBe ( 1 ) ;
205199 expect ( errorLogs [ 0 ] [ 0 ] . message ) . toMatch ( "Render Error" ) ;
@@ -571,11 +565,8 @@ test.describe("Error Sanitization", () => {
571565 expect ( html ) . toMatch ( "Index Error" ) ;
572566 expect ( html ) . not . toMatch ( "LOADER" ) ;
573567 expect ( html ) . toMatch ( "MESSAGE:Unexpected Server Error" ) ;
574- // This is the turbo-stream encoding - the fact that stack goes right
575- // into __type means it has no value
576- expect ( html ) . toMatch (
577- '\\"message\\",\\"Unexpected Server Error\\",\\"stack\\",\\"__type\\",\\"Error\\"' ,
578- ) ;
568+ expect ( html ) . toMatch ( '\\"SanitizedError\\"' ) ;
569+ expect ( html ) . toMatch ( '\\"Error\\",\\"Unexpected Server Error\\"' ) ;
579570 expect ( html ) . not . toMatch ( / a t / i) ;
580571 expect ( errorLogs [ 0 ] [ 0 ] ) . toEqual ( "App Specific Error Logging:" ) ;
581572 expect ( errorLogs [ 1 ] [ 0 ] ) . toEqual ( " Request: GET test://test/?loader" ) ;
@@ -589,11 +580,8 @@ test.describe("Error Sanitization", () => {
589580 let html = await response . text ( ) ;
590581 expect ( html ) . toMatch ( "Index Error" ) ;
591582 expect ( html ) . toMatch ( "MESSAGE:Unexpected Server Error" ) ;
592- // This is the turbo-stream encoding - the fact that stack goes right
593- // into __type means it has no value
594- expect ( html ) . toMatch (
595- '\\"message\\",\\"Unexpected Server Error\\",\\"stack\\",\\"__type\\",\\"Error\\"' ,
596- ) ;
583+ expect ( html ) . toMatch ( '\\"SanitizedError\\"' ) ;
584+ expect ( html ) . toMatch ( '\\"Error\\",\\"Unexpected Server Error\\"' ) ;
597585 expect ( html ) . not . toMatch ( / a t / i) ;
598586 expect ( errorLogs [ 0 ] [ 0 ] ) . toEqual ( "App Specific Error Logging:" ) ;
599587 expect ( errorLogs [ 1 ] [ 0 ] ) . toEqual ( " Request: GET test://test/?render" ) ;
0 commit comments