Download spectrum/api/utils/UserError.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/api/utils/UserError.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/api/utils/UserError.js
-
curl -L -o UserError.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/api/utils/UserError.js
346 Bytes
| // Taken from https://github.com/kadirahq/graphql-errors | |
| export const IsUserError = Symbol('IsUserError'); | |
| class UserError extends Error { | |
| constructor(...args) { | |
| super(...args); | |
| this.name = 'Error'; | |
| this.message = args[0]; | |
| this[IsUserError] = true; | |
| Error.captureStackTrace(this, 'Error'); | |
| } | |
| } | |
| export default UserError; | |