Send 500 http status code, instead of 200, for DBConnectionErrors
Bug: T160875 Change-Id: I4c909457938a19358dfc4b2aec216b1a148df46c
This commit is contained in:
parent
8260bc20b0
commit
2c1dc398be
1 changed files with 1 additions and 1 deletions
|
|
@ -42,10 +42,10 @@ class MWExceptionRenderer {
|
|||
} elseif ( self::isCommandLine() ) {
|
||||
self::printError( self::getText( $e ) );
|
||||
} elseif ( $mode === self::AS_PRETTY ) {
|
||||
self::statusHeader( 500 );
|
||||
if ( $e instanceof DBConnectionError ) {
|
||||
self::reportOutageHTML( $e );
|
||||
} else {
|
||||
self::statusHeader( 500 );
|
||||
self::header( "Content-Type: $wgMimeType; charset=utf-8" );
|
||||
self::reportHTML( $e );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue