Errors.js 613 B

12345678910111213141516171819202122232425
  1. const OError = require('@overleaf/o-error')
  2. class NotFoundError extends OError {}
  3. class OpRangeNotAvailableError extends OError {}
  4. class ProjectStateChangedError extends OError {}
  5. class DeleteMismatchError extends OError {}
  6. class FileTooLargeError extends OError {}
  7. class OTTypeMismatchError extends OError {
  8. /**
  9. * @param {OTType} got
  10. * @param {OTType} want
  11. */
  12. constructor(got, want) {
  13. super('ot type mismatch', { got, want })
  14. }
  15. }
  16. module.exports = {
  17. NotFoundError,
  18. OpRangeNotAvailableError,
  19. ProjectStateChangedError,
  20. DeleteMismatchError,
  21. FileTooLargeError,
  22. OTTypeMismatchError,
  23. }