More error handling fixes

See T154565

Change-Id: I073aae149497342157503ad3f465b7d57aaad4fa
This commit is contained in:
Alex Monk 2017-01-04 14:59:51 +00:00
parent 50e7fd0653
commit 8fe5bbe39b
2 changed files with 4 additions and 4 deletions

View file

@ -113,12 +113,12 @@ class ApiVisualEditor extends ApiBase {
} elseif ( $response['error'] !== '' ) {
$this->dieWithError(
[ 'apierror-visualeditor-docserver-http-error', wfEscapeWikiText( $response['error'] ) ],
$response['error']
'apierror-visualeditor-docserver-http-error'
);
} else { // error null, code not 200
$this->dieWithError(
[ 'apierror-visualeditor-docserver-http', $response['code'] ],
(string) $response['code']
'apierror-visualeditor-docserver-http'
);
}
return $response['body'];

View file

@ -54,8 +54,8 @@
"apierror-visualeditor-badcachekey": "No cached serialization found with that key",
"apierror-visualeditor-difffailed": "Diff failed",
"apierror-visualeditor-docserver": "Error contacting the Parsoid/RESTbase server",
"apierror-visualeditor-docserver-http": "docserver-http: HTTP $1",
"apierror-visualeditor-docserver-http-error": "docserver-http-error: $1",
"apierror-visualeditor-docserver-http": "HTTP $1",
"apierror-visualeditor-docserver-http-error": "$1",
"apierror-visualeditor-invaliddeflate": "Content provided is not properly deflated",
"apierror-visualeditor-latestnotfound": "Could not find latest revision for title",
"tooltip-ca-createsource": "Create the source code of this page",