Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F20795252
PhabricatorAjaxRequestExceptionHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
940 B
Referenced Files
None
Subscribers
None
PhabricatorAjaxRequestExceptionHandler.php
View Options
<?php
final
class
PhabricatorAjaxRequestExceptionHandler
extends
PhabricatorRequestExceptionHandler
{
public
function
getRequestExceptionHandlerPriority
()
{
return
110000
;
}
public
function
getRequestExceptionHandlerDescription
()
{
return
pht
(
'Responds to requests made by AJAX clients.'
);
}
public
function
canHandleRequestThrowable
(
AphrontRequest
$request
,
$throwable
)
{
// For non-workflow requests, return a Ajax response.
return
(
$request
->
isAjax
()
&&
!
$request
->
isWorkflow
());
}
public
function
handleRequestThrowable
(
AphrontRequest
$request
,
$throwable
)
{
// Log these; they don't get shown on the client and can be difficult
// to debug.
phlog
(
$throwable
);
$response
=
new
AphrontAjaxResponse
();
$response
->
setError
(
array
(
'code'
=>
get_class
(
$throwable
),
'info'
=>
$throwable
->
getMessage
(),
));
return
$response
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Jun 26, 6:23 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
16240061
Default Alt Text
PhabricatorAjaxRequestExceptionHandler.php (940 B)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment