23 matches across 1 files for error lang:JavaScript path:lib/response.js path:lib/response.js
snippet_mode: grep · sorted by relevance
lib/response.js JAVASCRIPT 23 matches · showing 5 view file →
14
15var contentDisposition = require('content-disposition');
16var createError = require('http-errors')
17var deprecate = require('depd')('express');
18var encodeUrl = require('encodeurl');
· · ·
54 *
55 * Expects an integer value between 100 and 999 inclusive.
56 * Throws an error if the provided status code is not an integer or if it's outside the allowable range.
57 *
58 * @param {number} code - The HTTP status code to set.
· · ·
59 * @return {ServerResponse} - Returns itself for chaining methods.
60 * @throws {TypeError} If `code` is not an integer.
61 * @throws {RangeError} If `code` is outside the range 100 to 999.
62 * @public
· · ·
61 * @throws {RangeError} If `code` is outside the range 100 to 999.
62 * @public
63 */
· · ·
66 // Check if the status code is not an integer
67 if (!Number.isInteger(code)) {
68 throw new TypeError(`Invalid status code: ${JSON.stringify(code)}. Status code must be an integer.`);
69 }
70 // Check if the status code is outside of Node's valid range
+ 18 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.