|
Download lang/lang-0010.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/lang/lang-0010.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm/lang/lang-0010.jsonl
-
curl -L -o lang-0010.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/lang/lang-0010.jsonl
1.12 kB
| {"type": "session", "harness": "opencode", "id": "lang-0010", "name": "Express.js Error Handling"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert software engineer."}} | |
| {"type": "message", "message": {"role": "user", "content": "How does Express.js handle errors?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Express error handling uses 4-parameter middleware:\n\n(err, req, res, next) -- Express detects 4 params = error handler\n\nError propagation: next(err) passes error to next error-handling middleware\nDefault handler: sends stack trace in development, 500 in production\n\nCommon patterns:\n- Async error catching: wrap async handlers with try/catch -> next(err)\n- Custom error classes: extend Error with statusCode property\n- Validation errors: return 400 with validation details\n- Not found: app.use('*') catch-all at end of middleware chain\n\nError middleware ordering: must be after all app.use() and route() calls\nMultiple error handlers: chain them for different error types\nHeaders sent check: res.headersSent prevents double response"}} | |