11 matches across 1 files for error lang:JavaScript path:examples/error/index.js path:examples/error/index.js
snippet_mode: auto · sorted by relevance
examples/error/index.js JAVASCRIPT 11 matches · showing 5 view file →
12if (!test) app.use(logger('dev'));
13
14// error handling middleware have an arity of 4
15// instead of the typical (req, res, next),
16// otherwise they behave exactly like regular
· · ·
18// in different orders etc.
19
20function error(err, req, res, next) {
21 // log it
22 if (!test) console.error(err.stack);
· · ·
22 if (!test) console.error(err.stack);
23
24 // respond with 500 "Internal Server Error".
· · ·
24 // respond with 500 "Internal Server Error".
25 res.status(500);
26 res.send('Internal Server Error');
· · ·
26 res.send('Internal Server Error');
27}
28
+ 6 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.