Spaces:
Sleeping
Sleeping
Download utils/catchAsyncError.js from abubasith86/hayat: direct link, hf CLI and curl.
- Browser
- Download file 158 Bytes
-
https://huggingface.co/spaces/abubasith86/hayat/resolve/main/utils/catchAsyncError.js
- Command line
-
hf download hf://spaces/abubasith86/hayat/utils/catchAsyncError.js
-
curl -L -o catchAsyncError.js https://huggingface.co/spaces/abubasith86/hayat/resolve/main/utils/catchAsyncError.js
158 Bytes
| let catchAsyncError = (fn) => { | |
| return (req, res, next) => { | |
| fn(req, res, next).catch((err) => next(err)); | |
| }; | |
| }; | |
| module.exports = catchAsyncError; | |