12 lines
349 B
TypeScript
12 lines
349 B
TypeScript
import httpStatus from 'http-status';
|
|
import type { TFunction } from 'i18next';
|
|
import APIError from './APIError';
|
|
|
|
class FileUploadError extends APIError {
|
|
constructor(t?: TFunction) {
|
|
super(t ? t('error:problemUploadingFile') : 'There was a problem while uploading the file.', httpStatus.BAD_REQUEST);
|
|
}
|
|
}
|
|
|
|
export default FileUploadError;
|