8a74d9cbe3
* fix(server): remove redundant code from bad merge * wrong router * WIP: http api for receiving file import results * Lints * fix * WIP: tests * test fix * auth middleware has implicit requirement for param named streamId * complete tests and fixes * can run the old way alongside the existing, no conflicts * tidying * correct error thrown * incorporate review comments
21 lines
756 B
TypeScript
21 lines
756 B
TypeScript
import { BaseError } from '@/modules/shared/errors'
|
|
|
|
//TODO this represents an internal server error and not a client/user error (e.g. error in a file content)
|
|
export class FileUploadInternalError extends BaseError {
|
|
static defaultMessage = 'A file upload error occurred.'
|
|
static code = 'FILE_UPLOAD_ERROR'
|
|
static statusCode = 500
|
|
}
|
|
|
|
export class FileImportJobNotFoundError extends BaseError {
|
|
static defaultMessage = 'The file upload job was not found.'
|
|
static code = 'FILE_IMPORT_JOB_NOT_FOUND'
|
|
static statusCode = 404
|
|
}
|
|
|
|
export class FileImportInvalidJobResultPayload extends BaseError {
|
|
static defaultMessage = 'The file upload job result was invalid.'
|
|
static code = 'FILE_IMPORT_INVALID_JOB_RESULT_PAYLOAD'
|
|
static statusCode = 400
|
|
}
|