2017-05-28 12:44:49 +03:00
|
|
|
<?php
|
|
|
|
namespace GraphQL\Error;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class UserError
|
|
|
|
*
|
2017-08-07 22:00:17 +03:00
|
|
|
* Error caused by actions of GraphQL clients. Can be safely displayed to a client...
|
2017-05-28 12:44:49 +03:00
|
|
|
*
|
|
|
|
* @package GraphQL\Error
|
|
|
|
*/
|
2017-07-18 16:57:30 +03:00
|
|
|
class UserError extends \RuntimeException implements ClientAware
|
2017-05-28 12:44:49 +03:00
|
|
|
{
|
2017-07-18 16:57:30 +03:00
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isClientSafe()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2017-08-07 22:00:17 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getCategory()
|
|
|
|
{
|
|
|
|
return 'user';
|
|
|
|
}
|
2017-05-28 12:44:49 +03:00
|
|
|
}
|