mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 03:07:32 +00:00
25 lines
578 B
JavaScript
25 lines
578 B
JavaScript
'use strict';
|
|
|
|
const { ApplicationError } = require('@strapi/utils').errors;
|
|
|
|
class FileTooLargeError extends ApplicationError {
|
|
constructor(message, details) {
|
|
super(message, details);
|
|
this.name = 'FileTooLargeError';
|
|
this.message = message || 'The file is bigger than the limit size';
|
|
}
|
|
}
|
|
|
|
class FileNotFoundError extends ApplicationError {
|
|
constructor(message, details) {
|
|
super(message, details);
|
|
this.name = 'FileNotFoundError';
|
|
this.message = message || 'File not found';
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
FileTooLargeError,
|
|
FileNotFoundError,
|
|
};
|