Spaces:
Configuration error
Configuration error
Download src/utils/errors.js from UUUZCX/video-optimizer-bot: direct link, hf CLI and curl.
- Browser
- Download file 434 Bytes
-
https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/utils/errors.js
- Command line
-
hf download hf://spaces/UUUZCX/video-optimizer-bot/src/utils/errors.js
-
curl -L -o errors.js https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/utils/errors.js
434 Bytes
| class AppError extends Error { | |
| constructor(message, code = "APP_ERROR", details = {}) { | |
| super(message); | |
| this.name = "AppError"; | |
| this.code = code; | |
| this.details = details; | |
| } | |
| } | |
| function serializeError(error) { | |
| return { | |
| name: error?.name || "Error", | |
| message: error?.message || String(error), | |
| code: error?.code || "UNKNOWN", | |
| stack: error?.stack | |
| }; | |
| } | |
| module.exports = { AppError, serializeError }; | |