Files
speckle-server/packages/server/modules/automate/errors/runs.ts
T
Iain Sproat f93d9093a0 fix(errors): all error should define an appropriate status code (#3112)
* fix(errors): all error should define a status code (default is 500)
- rename NoInviteFoundError to InviteNotFoundError to match xNotFoundError pattern

* remove unused errors
2024-09-25 13:08:13 +02:00

21 lines
677 B
TypeScript

import { BaseError } from '@/modules/shared/errors/base'
export class FunctionRunNotFoundError extends BaseError {
static defaultMessage = 'Could not find function run with given id'
static code = 'FUNCTION_RUN_NOT_FOUND'
static statusCode = 404
}
export class FunctionRunReportStatusError extends BaseError {
static defaultMessage =
'An error occurred while updating function run report statuses'
static code = 'FUNCTION_RUN_REPORT_STATUSES_ERROR'
static statusCode = 400
}
export class TriggerAutomationError extends BaseError {
static defaultMessage = 'Error triggering automation'
static code = 'TRIGGER_AUTOMATION_ERROR'
static statusCode = 400
}