| 1 | import { HttpStatus } from '@nestjs/common'; |
| 2 | |
| 3 | import { DomainError } |
| 4 | |
| 5 | export class AttachmentNotFoundError |
| 6 | status: number |
| 7 | |
| 8 | constructor() { |
| 9 | super('Attachment not found'); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | export class AttachmentTooLargeError |
| 14 | status: number |
| 15 | |
| 16 | constructor(limit: |
| 17 | super(`Attachments are limited to ${limit |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | export class AttachmentTypeNotAllowedError |
| 22 | status: number |
| 23 | |
| 24 | constructor(name: |
| 25 | super( |
| 26 | `${name} cannot be attached. Attach a file ending in ${allowed |
| 27 | ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | export class AttachmentNotOctetStreamError |
| 32 | status: number |
| 33 | |
| 34 | constructor() { |
| 35 | super( |
| 36 | 'Send the file as application/octet-stream; what it is served as follows from its name', |
| 37 | ); |
| 38 | } |
| 39 | } |