{"record":{"id":"a024ccf650ac8fb1","repo":"apify/crawlee","slug":"the-response-property-is-not-available-skipna-a024cc","errorCode":null,"errorMessage":"The `response` property is not available - `skipNavigation` was used","messagePattern":"The `response` 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":514,"sourceCode":"    }\n\n    private async prepareHttpRequest(crawlingContext: CrawlingContext): Promise<Partial<CrawlingContextWithResponse>> {\n        const { request } = crawlingContext;\n\n        if (request.skipNavigation) {\n            return {\n                request: new Proxy(request, {\n                    get(target, propertyName, receiver) {\n                        if (propertyName === 'loadedUrl') {\n                            throw new NavigationSkippedError(\n                                'The `request.loadedUrl` property is not available - `skipNavigation` was used',\n                            );\n                        }\n                        return Reflect.get(target, propertyName, receiver);\n                    },\n                }) as LoadedRequest<CrawleeRequest>,\n                get response(): InternalHttpCrawlingContext['response'] {\n                    throw new NavigationSkippedError(\n                        'The `response` property is not available - `skipNavigation` was used',\n                    );\n                },\n            } as Partial<CrawlingContextWithResponse>;\n        }\n\n        request.state = RequestState.BEFORE_NAV;\n        return {};\n    }\n\n    private async makeHttpRequest(\n        crawlingContext: CrawlingContext,\n    ): Promise<Omit<CrawlingContextWithResponse, keyof CrawlingContext> & Partial<CrawlingContextWithResponse>> {\n        tryCancel();\n\n        const { request, session } = crawlingContext;\n        const proxyUrl = crawlingContext.proxyInfo?.url;\n","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/http-crawler/src/internals/http-crawler.ts#L496-L532","documentation":"NavigationSkippedError thrown by the getter for `response` on the crawling context. With `skipNavigation: true` no HTTP response exists, so the property getter throws rather than exposing an undefined response object that could crash user code downstream.","triggerScenarios":"Accessing `context.response` in a request handler for a request queued with `skipNavigation: true`.","commonSituations":"Generic request handlers that inspect `context.response.status` or headers for all requests; handlers shared between fetched and skipNavigation requests; logging helpers that serialize the whole context.","solutions":["Guard access with `if (context.request.skipNavigation)` before touching `context.response`.","Use `pushData`/`enqueueLinks` directly from available request data instead of response-derived data for skipped requests.","Route skipNavigation requests to a dedicated handler that never reads `response`."],"exampleFix":"// before\nconst status = context.response.status;\n// after\nconst status = context.request.skipNavigation ? undefined : context.response.status;","handlingStrategy":"type-guard","validationCode":"if (request.skipNavigation) { skipResponseLogic(); return; }","typeGuard":"function hasResponse(ctx: CrawlingContext): boolean { return !(ctx.request as any).skipNavigation && 'response' in ctx; }","tryCatchPattern":"try { const { status } = ctx.response; } catch (err) { if (err instanceof NavigationSkippedError) { /* handle skipped case */ } else throw err; }","preventionTips":["Early-return in handlers when request.skipNavigation is true.","Do not blindly destructure response from the context.","Keep separate handler functions for seeded vs fetched requests.","Serialize only needed fields, not whole contexts, in logging."],"tags":["skip-navigation","response","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"}