The existing response seems to be designed to look good with
format=xmlfm, which doesn't make much sense now that format=jsonfm is
the default.
Change-Id: Ic3993aaf7e401d6233bbbe4522e77004099e3c40
'code' => 'internal_api_error_' . get_class( $e ),
'info' => '[' . MWExceptionHandler::getLogId( $e ) . '] ' . $info,
);
- ApiResult::setContent(
- $errMessage,
- $config->get( 'ShowExceptionDetails' )
- ? "\n\n" . MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n\n"
- : ''
- );
+ if ( $config->get( 'ShowExceptionDetails' ) ) {
+ ApiResult::setContent(
+ $errMessage,
+ MWExceptionHandler::getRedactedTraceAsString( $e )
+ );
+ }
}
// Remember all the warnings to re-add them later