Leantime/leantime · error · Exception

Cannot find canvas with id '$id'

Error message

Cannot find canvas with id '$id'

What it means

Error "Cannot find canvas with id '$id'" thrown in Leantime/leantime.

Source

Thrown at app/Domain/Canvas/Controllers/Export.php:110

        return $response;
    }

    /**
     * Generates XML data for the given canvas.
     *
     * @param  int  $id  Canvas identifier
     * @return string XML data
     *
     * @throws BindingResolutionException
     * @throws Exception
     */
    protected function export(int $id): string
    {
        // getBoard authorizes VIEW against the board's real project and returns false for a
        // missing/foreign/unauthorized board (export is reachable by arbitrary board id).
        $canvasAry = $this->blueprintsService->getBoard($id, static::CANVAS_NAME.static::CANVAS_TYPE);
        ! empty($canvasAry) || throw new Exception("Cannot find canvas with id '$id'");

        $projectId = $canvasAry[0]['projectId'];
        $recordsAry = $this->blueprintsService->getBoardItems($id, static::CANVAS_NAME.static::CANVAS_TYPE, static::CANVAS_NAME.'canvasitem');

        $projectService = app()->make(ProjectService::class);
        $projectAry = $projectService->getProject($projectId);
        ! empty($projectAry) || throw new Exception("Cannot retrieve project id '$projectId'");

        $xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'.PHP_EOL.PHP_EOL;
        $xml .= $this->xmlExport(static::CANVAS_NAME.static::CANVAS_TYPE, $canvasAry[0]['title'], $recordsAry);

        return $xml;
    }

    /**
     * Generates XML markup for canvas data.
     *
     * @param  string  $canvasKey  Encoded canvas name

View on GitHub (pinned to 9a9f49f100)

When it happens

Trigger: Thrown at app/Domain/Canvas/Controllers/Export.php:110 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Leantime/leantime@9a9f49f100 (2026-08-21). Data as JSON: /api/errors/a25af2c0c456967c. Report an issue: GitHub.