diff options
author | Brad Jorsch <bjorsch@wikimedia.org> | 2018-11-26 13:31:41 -0500 |
---|---|---|
committer | Brad Jorsch <bjorsch@wikimedia.org> | 2018-11-26 13:42:07 -0500 |
commit | c765b4e37cfb39ca41ece6e47c43885fd79d6454 (patch) | |
tree | b05eee1cd7e9cbed5f88febd85e6a37f94561cc1 /tests/phpunit/includes/api/ApiErrorFormatterTest.php | |
parent | 4eace785e66d199cb8fe1ec224bdc49831949a6d (diff) | |
download | mediawikicore-c765b4e37cfb39ca41ece6e47c43885fd79d6454.tar.gz mediawikicore-c765b4e37cfb39ca41ece6e47c43885fd79d6454.zip |
API: Add exception class as data to internal_api_error codes
The code for all uncaught exceptions will in the future be
"internal_api_error". If the client needs to know the class name for
some reason, it can check the new 'errorclass' data item on the error.
Change-Id: Ia9e32bbb8d17692203f4fbcee53a20e87be1776e
Diffstat (limited to 'tests/phpunit/includes/api/ApiErrorFormatterTest.php')
-rw-r--r-- | tests/phpunit/includes/api/ApiErrorFormatterTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/phpunit/includes/api/ApiErrorFormatterTest.php b/tests/phpunit/includes/api/ApiErrorFormatterTest.php index 65a511d85bec..312ef55e8fa4 100644 --- a/tests/phpunit/includes/api/ApiErrorFormatterTest.php +++ b/tests/phpunit/includes/api/ApiErrorFormatterTest.php @@ -599,7 +599,9 @@ class ApiErrorFormatterTest extends MediaWikiLangTestCase { [ 'text' => '<b>Something broke!</b>', 'code' => 'internal_api_error_RuntimeException', - 'data' => [], + 'data' => [ + 'errorclass' => 'RuntimeException', + ], ] ], 'Normal exception, wrapped' => [ |