public function invalidResource(
        string $path,
        ?string $detail = null,
        array $failed = []
    ): ErrorInterface
    {
        return new Error(
            null,
            null,
            Response::HTTP_UNPROCESSABLE_ENTITY,
            $this->trans('resource_invalid', 'code'),
            $this->trans('resource_invalid', 'title'),
            $detail ?: $this->trans('resource_invalid', 'detail'),
            $this->pointer($path),
            $failed ? compact('failed') : null
        );
    }