File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
examples/basic/src/framework Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1156,7 +1156,9 @@ function defineTest(f: Fixture) {
11561156 . click ( )
11571157 const response = await responsePromise
11581158 expect ( response . status ( ) ) . toBe ( 500 )
1159- await expect ( response . text ( ) ) . resolves . toBe ( 'Internal Server Error' )
1159+ await expect ( response . text ( ) ) . resolves . toBe (
1160+ 'Internal Server Error: server action failed' ,
1161+ )
11601162 } )
11611163 } )
11621164
Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ export async function handleRequest({
6868 const result = await decodedAction ( )
6969 formState = await decodeFormState ( result , formData )
7070 } catch ( e ) {
71- statusCode = 500
71+ // there's no single general obvious way to surface this error,
72+ // so explicitly return classic 500 response.
73+ return new Response ( 'Internal Server Error: server action failed' , {
74+ status : 500 ,
75+ } )
7276 }
7377 }
7478 }
You can’t perform that action at this time.
0 commit comments