public static function Error::invalidRequest in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/Object/Error.php \Drupal\jsonrpc\Object\Error::invalidRequest()
Constructs a new invalid request error.
Parameters
mixed $data: More specific information about the error.
\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: (optional) A cacheable dependency.
Return value
static
2 calls to Error::invalidRequest()
- Handler::checkAccess in src/
Handler.php - Check execution access.
- RpcRequestFactory::isBatchRequest in src/
Shaper/ RpcRequestFactory.php - Determine if the request is a batch request.
File
- src/
Object/ Error.php, line 147
Class
- Error
- Error class to help implement JSON RPC's spec for errors.
Namespace
Drupal\jsonrpc\ObjectCode
public static function invalidRequest($data = NULL, CacheableDependencyInterface $cacheability = NULL) {
return new static(static::INVALID_REQUEST, static::$errorMessages[static::INVALID_REQUEST], $data ?: static::$errorMeanings[static::INVALID_REQUEST], $cacheability);
}