Differential D21464 Diff 51076 src/applications/conduit/controller/PhabricatorConduitAPIController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/controller/PhabricatorConduitAPIController.php
| Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | try { | ||||
| if ($allow_unguarded_writes) { | if ($allow_unguarded_writes) { | ||||
| unset($unguarded); | unset($unguarded); | ||||
| } | } | ||||
| } else { | } else { | ||||
| list($error_code, $error_info) = $auth_error; | list($error_code, $error_info) = $auth_error; | ||||
| } | } | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| $result = null; | $result = null; | ||||
| $error_code = ($ex instanceof ConduitException | |||||
| ? 'ERR-CONDUIT-CALL' | if ($ex instanceof ConduitException) { | ||||
| : 'ERR-CONDUIT-CORE'); | $error_code = 'ERR-CONDUIT-CALL'; | ||||
| } else { | |||||
| $error_code = 'ERR-CONDUIT-CORE'; | |||||
| // See T13581. When a Conduit method raises an uncaught exception | |||||
| // other than a "ConduitException", log it. | |||||
| phlog($ex); | |||||
| } | |||||
| $error_info = $ex->getMessage(); | $error_info = $ex->getMessage(); | ||||
| } | } | ||||
| $log | $log | ||||
| ->setCallerPHID( | ->setCallerPHID( | ||||
| isset($conduit_user) | isset($conduit_user) | ||||
| ? $conduit_user->getPHID() | ? $conduit_user->getPHID() | ||||
| : null) | : null) | ||||
| ▲ Show 20 Lines • Show All 624 Lines • Show Last 20 Lines | |||||