Spaces:
Runtime error
Runtime error
Download api/src/utils/errors.ts from supernovagateway/Steel: direct link, hf CLI and curl.
- Browser
- Download file 228 Bytes
-
https://huggingface.co/spaces/supernovagateway/Steel/resolve/main/api/src/utils/errors.ts
- Command line
-
hf download hf://spaces/supernovagateway/Steel/api/src/utils/errors.ts
-
curl -L -o errors.ts https://huggingface.co/spaces/supernovagateway/Steel/resolve/main/api/src/utils/errors.ts
228 Bytes
| export function getErrors(e: unknown) { | |
| let error: string; | |
| if (typeof e === "string") { | |
| error = e; | |
| } else if (e instanceof Error) { | |
| error = e.message; | |
| } else { | |
| error = "Unknown error"; | |
| } | |
| return error; | |
| } | |