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
Link here
A canceled request crashes the service
Canceled requests should not throw errors and crash the service
Add any other context about the problem here. If applicable, add screenshots to help explain.
The text was updated successfully, but these errors were encountered:
add
res.onAborted(() => { return false; });
Sorry, something went wrong.
@Najsar unfortunately the error persists
import nanoexpress from 'nanoexpress'; const app = nanoexpress(); app .get('/test', async (req, res) => { req.onAborted(() => false); res.onAborted(() => false); await new Promise(resolve => setTimeout(() => resolve(), 5000)); return res.send('success'); }); app.listen(3000);
or
import nanoexpress from 'nanoexpress'; const app = nanoexpress(); app .get('/test', async (req, res) => { req.onAborted(() => res.send('error')); res.onAborted(() => res.send('error')); await new Promise(resolve => setTimeout(() => resolve(), 5000)); return res.send('success'); }); app.listen(3000);
not works
No branches or pull requests
Bug Report
Is you/your team sponsoring this project
If your team sponsoring this project, please attach here your team lead or who purchased license GitHub login
Minimal reproducible repo
Link here
Current Behavior
A canceled request crashes the service
Expected behavior/code
Canceled requests should not throw errors and crash the service
Environment
Possible Solution
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
Note
The text was updated successfully, but these errors were encountered: