We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifically ones with fake content-length.
import fastify from 'fastify'; import axios from 'axios'; const instance = fastify({ requestTimeout: 1000 }); instance.setErrorHandler((err, req, res) => { console.log(err); //This still logs. return { status: false, message: 'should be overwitten' }; }); instance.post('/', (req, res) => { console.log(req.body); }); await instance.listen({ host: '0.0.0.0', port: 8000 }); console.log('listened'); const x = await axios({ method: 'POST', url: 'http://0.0.0.0:8000', headers: { 'Content-Length': 16, 'Content-Type': 'application/json' }, data: 'a', validateStatus: () => true }); console.log(x.data); //Received body /** * { error: 'Request Timeout', message: 'Client Timeout', statusCode: 408 } */
The logs from the instance are as follows.
listened { error: 'Request Timeout', message: 'Client Timeout', statusCode: 408 } Error: aborted at abortIncoming (node:_http_server:809:17) at socketOnClose (node:_http_server:803:3) at Socket.emit (node:events:536:35) at TCP.<anonymous> (node:net:350:12) { code: 'ECONNRESET', statusCode: 400 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My fastfiy instance does not use the body returned by my custom error handler for request timeouts.
Specifically ones with fake content-length.
The logs from the instance are as follows.
Your Environment
The text was updated successfully, but these errors were encountered: