Skip to content

Commit 68a3758

Browse files
committed
return a 500 error code on ajax subscribe failure (see PR 445)
1 parent 1bd35f2 commit 68a3758

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

public_html/lists/index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,8 @@
278278

279279
echo 'FAIL';
280280

281-
// thow an exception so the http status code is a 500
282-
// Internal Server Error, easily caught by jquery.ajax()
283-
throw new Exception( "Error: Subscribe attempt failed!" );
281+
// return a 500, so that it is more easily processed at the other end
282+
http_response_code( 500 );
284283

285284
}
286285
break;

0 commit comments

Comments
 (0)