mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
0c63515de6
[document-updater] return 413 error when doc is too large GitOrigin-RevId: d66300c78bea4071f29044be160929dba782b728
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
/* eslint-disable
|
|
no-proto,
|
|
no-unused-vars,
|
|
*/
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
// Fix any style issues and re-enable lint.
|
|
let Errors
|
|
function NotFoundError(message) {
|
|
const error = new Error(message)
|
|
error.name = 'NotFoundError'
|
|
error.__proto__ = NotFoundError.prototype
|
|
return error
|
|
}
|
|
NotFoundError.prototype.__proto__ = Error.prototype
|
|
|
|
function OpRangeNotAvailableError(message) {
|
|
const error = new Error(message)
|
|
error.name = 'OpRangeNotAvailableError'
|
|
error.__proto__ = OpRangeNotAvailableError.prototype
|
|
return error
|
|
}
|
|
OpRangeNotAvailableError.prototype.__proto__ = Error.prototype
|
|
|
|
function ProjectStateChangedError(message) {
|
|
const error = new Error(message)
|
|
error.name = 'ProjectStateChangedError'
|
|
error.__proto__ = ProjectStateChangedError.prototype
|
|
return error
|
|
}
|
|
ProjectStateChangedError.prototype.__proto__ = Error.prototype
|
|
|
|
function DeleteMismatchError(message) {
|
|
const error = new Error(message)
|
|
error.name = 'DeleteMismatchError'
|
|
error.__proto__ = DeleteMismatchError.prototype
|
|
return error
|
|
}
|
|
DeleteMismatchError.prototype.__proto__ = Error.prototype
|
|
|
|
function FileTooLargeError(message) {
|
|
const error = new Error(message)
|
|
error.name = 'FileTooLargeError'
|
|
error.__proto__ = FileTooLargeError.prototype
|
|
return error
|
|
}
|
|
FileTooLargeError.prototype.__proto__ = Error.prototype
|
|
|
|
module.exports = Errors = {
|
|
NotFoundError,
|
|
OpRangeNotAvailableError,
|
|
ProjectStateChangedError,
|
|
DeleteMismatchError,
|
|
FileTooLargeError,
|
|
}
|