{"record":{"id":"a25af2c0c456967c","repo":"Leantime/leantime","slug":"cannot-find-canvas-with-id-id","errorCode":null,"errorMessage":"Cannot find canvas with id '$id'","messagePattern":"Cannot find canvas with id '\\$id'","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Domain/Canvas/Controllers/Export.php","lineNumber":110,"sourceCode":"\n        return $response;\n    }\n\n    /**\n     * Generates XML data for the given canvas.\n     *\n     * @param  int  $id  Canvas identifier\n     * @return string XML data\n     *\n     * @throws BindingResolutionException\n     * @throws Exception\n     */\n    protected function export(int $id): string\n    {\n        // getBoard authorizes VIEW against the board's real project and returns false for a\n        // missing/foreign/unauthorized board (export is reachable by arbitrary board id).\n        $canvasAry = $this->blueprintsService->getBoard($id, static::CANVAS_NAME.static::CANVAS_TYPE);\n        ! empty($canvasAry) || throw new Exception(\"Cannot find canvas with id '$id'\");\n\n        $projectId = $canvasAry[0]['projectId'];\n        $recordsAry = $this->blueprintsService->getBoardItems($id, static::CANVAS_NAME.static::CANVAS_TYPE, static::CANVAS_NAME.'canvasitem');\n\n        $projectService = app()->make(ProjectService::class);\n        $projectAry = $projectService->getProject($projectId);\n        ! empty($projectAry) || throw new Exception(\"Cannot retrieve project id '$projectId'\");\n\n        $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>'.PHP_EOL.PHP_EOL;\n        $xml .= $this->xmlExport(static::CANVAS_NAME.static::CANVAS_TYPE, $canvasAry[0]['title'], $recordsAry);\n\n        return $xml;\n    }\n\n    /**\n     * Generates XML markup for canvas data.\n     *\n     * @param  string  $canvasKey  Encoded canvas name","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/Leantime/leantime/blob/9a9f49f1008f4782b30f6723c54228f4f992e636/app/Domain/Canvas/Controllers/Export.php#L92-L128","documentation":"Error \"Cannot find canvas with id '$id'\" thrown in Leantime/leantime.","triggerScenarios":"Thrown at app/Domain/Canvas/Controllers/Export.php:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9a9f49f1008f4782b30f6723c54228f4f992e636","analyzedAt":"2026-08-21T02:37:38.966Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}