Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96616683
PhabricatorConduitRequestExceptionHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Dec 28, 23:44
Size
806 B
Mime Type
text/x-php
Expires
Mon, Dec 30, 23:44 (2 d)
Engine
blob
Format
Raw Data
Handle
23216299
Attached To
rPH Phabricator
PhabricatorConduitRequestExceptionHandler.php
View Options
<?php
final
class
PhabricatorConduitRequestExceptionHandler
extends
PhabricatorRequestExceptionHandler
{
public
function
getRequestExceptionHandlerPriority
()
{
return
100000
;
}
public
function
getRequestExceptionHandlerDescription
()
{
return
pht
(
'Responds to requests made by Conduit clients.'
);
}
public
function
canHandleRequestThrowable
(
AphrontRequest
$request
,
$throwable
)
{
return
$request
->
isConduit
();
}
public
function
handleRequestThrowable
(
AphrontRequest
$request
,
$throwable
)
{
$response
=
id
(
new
ConduitAPIResponse
())
->
setErrorCode
(
get_class
(
$throwable
))
->
setErrorInfo
(
$throwable
->
getMessage
());
return
id
(
new
AphrontJSONResponse
())
->
setAddJSONShield
(
false
)
->
setContent
(
$response
->
toDictionary
());
}
}
Event Timeline
Log In to Comment