budibase/packages/string-templates/src/errors.ts

14 lines
315 B
TypeScript
Raw Normal View History

2024-02-21 19:40:50 +01:00
export class JsErrorTimeout extends Error {
code = "ERR_SCRIPT_EXECUTION_TIMEOUT"
}
export class UserScriptError extends Error {
code = "USER_SCRIPT_ERROR"
constructor(readonly userScriptError: Error) {
super(
`error while running user-supplied JavaScript: ${userScriptError.message}`
)
}
}