23 matches across 1 files for error lang:JavaScript lang:JavaScript 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');
· · ·
53 *
54 * Expects an integer value between 100 and 999 inclusive.
55 * Throws an error if the provided status code is not an integer or if it's outside the allowable range.
56 *
57 * @param {number} code - The HTTP status code to set.
· · ·
58 * @return {ServerResponse} - Returns itself for chaining methods.
59 * @throws {TypeError} If `code` is not an integer.
60 * @throws {RangeError} If `code` is outside the range 100 to 999.
61 * @public
· · ·
60 * @throws {RangeError} If `code` is outside the range 100 to 999.
61 * @public
62 */
· · ·
65 // Check if the status code is not an integer
66 if (!Number.isInteger(code)) {
67 throw new TypeError(`Invalid status code: ${JSON.stringify(code)}. Status code must be an integer.`);
68 }
69 // 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.