Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F455422
PhabricatorConduitRequestExceptionHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
806 B
Referenced Files
None
Subscribers
None
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
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 6:59 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70455
Default Alt Text
PhabricatorConduitRequestExceptionHandler.php (806 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment