API: Only take HTTP code from ApiUsageException
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 23 Jul 2019 14:23:07 +0000 (10:23 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 23 Jul 2019 14:24:18 +0000 (10:24 -0400)
commitacb2e15615a5cc792b08dd62494dd0608b1a9d33
tree8f4d9bf604223d2de2905d35aa9fcf48383982c8
parentded74c4ee8e9c8b34059285fc3e1b54956c80ae5
API: Only take HTTP code from ApiUsageException

Codes set on other Exception types are unlikely to be intended as HTTP
codes.

Bug: T228758
Change-Id: Ia6a53cb621f87ff97d5f16215a1b09ae11ca8f53
includes/api/ApiMain.php