{"record":{"id":"aff3d1c23cd7d8dd","repo":"n8n-io/n8n","slug":"provided-skip-value-is-not-a-number-please-prov","errorCode":null,"errorMessage":"Provided \"skip\" value is not a number. Please provide a numeric value.","messagePattern":"Provided \"skip\" value is not a number\\. Please provide a numeric value\\.","errorType":"exception","errorClass":"TypeORMError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/typeorm/src/query-builder/SelectQueryBuilder.ts","lineNumber":1375,"sourceCode":"\t * Sets maximal number of entities to take.\n\t */\n\ttake(take?: number): this {\n\t\tthis.expressionMap.take = this.normalizeNumber(take);\n\t\tif (this.expressionMap.take !== undefined && isNaN(this.expressionMap.take))\n\t\t\tthrow new TypeORMError(\n\t\t\t\t`Provided \"take\" value is not a number. Please provide a numeric value.`,\n\t\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets number of entities to skip.\n\t */\n\tskip(skip?: number): this {\n\t\tthis.expressionMap.skip = this.normalizeNumber(skip);\n\t\tif (this.expressionMap.skip !== undefined && isNaN(this.expressionMap.skip))\n\t\t\tthrow new TypeORMError(\n\t\t\t\t`Provided \"skip\" value is not a number. Please provide a numeric value.`,\n\t\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set certain index to be used by the query.\n\t *\n\t * @param index Name of index to be used.\n\t */\n\tuseIndex(index: string): this {\n\t\tthis.expressionMap.useIndex = index;\n\n\t\treturn this;\n\t}\n\n\t/**","sourceCodeStart":1357,"sourceCodeEnd":1393,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/typeorm/src/query-builder/SelectQueryBuilder.ts#L1357-L1393","documentation":"Thrown by SelectQueryBuilder.skip when the normalized value is NaN. `skip` is the join-safe counterpart of offset and shares the same isNaN guard after normalizeNumber.","triggerScenarios":"`.skip('abc')`, `.skip('')`, `.skip(NaN)` from arithmetic on un-parsed inputs, or `.skip(req.query.cursor)` where cursor is a non-numeric token.","commonSituations":"Cursor/page-index passed through as string; skip computed as `(page - 1) * take` where one factor is a string, producing concatenation then NaN.","solutions":["Parse and validate: `const skip = Number(raw); if (!Number.isFinite(skip)) throw ...`.","Compute skip from parsed take/page only: `skip = (Number(page) - 1) * Number(take)`.","Pass undefined to skip the operation entirely."],"exampleFix":"// before\nqb.skip(`${req.query.page - 1}0`); // malformed string\n// after\nconst page = Number(req.query.page) || 1;\nqb.skip((page - 1) * 10);","handlingStrategy":"validation","validationCode":"function toSkip(value: unknown): number | undefined {\n  if (value == null || value === '') return undefined;\n  const n = Number(value);\n  if (!Number.isFinite(n) || n < 0) throw new Error(`Invalid skip: ${String(value)}`);\n  return Math.trunc(n);\n}\n// then: qb.skip(toSkip(req.query.skip));","typeGuard":"function isNonNegativeInt(v: unknown): v is number {\n  return typeof v === 'number' && Number.isInteger(v) && v >= 0;\n}","tryCatchPattern":null,"preventionTips":["Compute skip from parsed page/take, never from string arithmetic.","Validate skip is a non-negative integer before calling the query builder.","Use skip/take consistently for join-based pagination."],"tags":["typeorm","query-builder","validation","pagination"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}