X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=includes%2FWatchedItemQueryService.php;h=cd78b499df3a4b75ce2eae7bee24c8f2b8a309f8;hb=c242b4351b7446c7c1d029c483ef12f0f1307f5c;hp=0c3d52a39fefd78ad0ed1108a413407172f5f205;hpb=1dd2e07276e1deaf431ddb01c92111038f9e2cd6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItemQueryService.php b/includes/WatchedItemQueryService.php index 0c3d52a39f..cd78b499df 100644 --- a/includes/WatchedItemQueryService.php +++ b/includes/WatchedItemQueryService.php @@ -422,10 +422,7 @@ class WatchedItemQueryService { $ownersToken = $watchlistOwner->getOption( 'watchlisttoken' ); $token = $options['watchlistOwnerToken']; if ( $ownersToken == '' || !hash_equals( $ownersToken, $token ) ) { - throw new UsageException( - 'Incorrect watchlist token provided -- please set a correct token in Special:Preferences', - 'bad_wltoken' - ); + throw ApiUsageException::newWithMessage( null, 'apierror-bad-watchlist-token', 'bad_wltoken' ); } return $watchlistOwner->getId(); }