{"record":{"id":"29e6f957bcf27e36","repo":"apify/crawlee","slug":"the-json-property-is-not-available-skipnaviga","errorCode":null,"errorMessage":"The `json` property is not available - `skipNavigation` was used","messagePattern":"The `json` property is not available - `skipNavigation` was used","errorType":"exception","errorClass":"NavigationSkippedError","httpStatus":null,"severity":"error","filePath":"packages/http-crawler/src/internals/http-crawler.ts","lineNumber":567,"sourceCode":"    private async processHttpResponse(\n        crawlingContext: CrawlingContextWithResponse,\n    ): Promise<\n        Omit<InternalHttpCrawlingContext, keyof CrawlingContextWithResponse> & Partial<InternalHttpCrawlingContext>\n    > {\n        if (crawlingContext.request.skipNavigation) {\n            return {\n                get contentType(): InternalHttpCrawlingContext['contentType'] {\n                    throw new NavigationSkippedError(\n                        'The `contentType` property is not available - `skipNavigation` was used',\n                    );\n                },\n                get body(): InternalHttpCrawlingContext['body'] {\n                    throw new NavigationSkippedError(\n                        'The `body` property is not available - `skipNavigation` was used',\n                    );\n                },\n                get json(): InternalHttpCrawlingContext['json'] {\n                    throw new NavigationSkippedError(\n                        'The `json` property is not available - `skipNavigation` was used',\n                    );\n                },\n                get waitForSelector(): InternalHttpCrawlingContext['waitForSelector'] {\n                    throw new NavigationSkippedError(\n                        'The `waitForSelector` method is not available - `skipNavigation` was used',\n                    );\n                },\n                get parseWithCheerio(): InternalHttpCrawlingContext['parseWithCheerio'] {\n                    throw new NavigationSkippedError(\n                        'The `parseWithCheerio` method is not available - `skipNavigation` was used',\n                    );\n                },\n            };\n        }\n\n        tryCancel();\n","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/http-crawler/src/internals/http-crawler.ts#L549-L585","documentation":"NavigationSkippedError thrown by the getter for `json` on the crawling context. There is no response body to JSON-parse for `skipNavigation` requests, so the getter throws to make the misuse explicit.","triggerScenarios":"Calling `await context.json` in a request handler for a request created with `skipNavigation: true`.","commonSituations":"API-crawling handlers reused for seed/skip requests; generic data-extraction handlers applied to all queued requests.","solutions":["Only call `context.json` when navigation actually happened.","Attach the JSON payload to `userData` at queue time if skipped requests need data.","Route skipped requests to a dedicated handler."],"exampleFix":"// before\nconst data = await context.json;\n// after\nconst data = context.request.skipNavigation ? context.request.userData.payload : await context.json;","handlingStrategy":"type-guard","validationCode":"if (request.skipNavigation) { data = request.userData.payload; } else { data = await ctx.json; }","typeGuard":"function canParseJson(ctx: CrawlingContext): boolean { return !(ctx.request as any).skipNavigation; }","tryCatchPattern":"try { const data = await ctx.json; } catch (err) { if (err instanceof NavigationSkippedError) { /* fallback to request.userData */ } else throw err; }","preventionTips":["Only await ctx.json after real navigation.","Serialize needed JSON into userData at enqueue time.","Avoid generic handlers over mixed request types.","Use label-based routing."],"tags":["skip-navigation","json","http-crawler"],"backgroundTag":"navigation-skipped-property-access","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}