Spaces:
Paused
Paused
Download utilities/ReqError.js from arabdullah/chatty: direct link, hf CLI and curl.
- Browser
- Download file 252 Bytes
-
https://huggingface.co/spaces/arabdullah/chatty/resolve/main/utilities/ReqError.js
- Command line
-
hf download hf://spaces/arabdullah/chatty/utilities/ReqError.js
-
curl -L -o ReqError.js https://huggingface.co/spaces/arabdullah/chatty/resolve/main/utilities/ReqError.js
252 Bytes
| module.exports = class extends Error { | |
| constructor(statusCode, message) { | |
| super(message); | |
| this.statusCode = statusCode; | |
| this.status = this.statusCode >= 500 ? "fail" : "error"; | |
| Error.captureStackTrace(this, this.constructor); | |
| } | |
| }; | |