83bc1c616 days ago27 lines · 647 B| 1 | import { HttpStatus } from '@nestjs/common'; |
| 2 | |
| 3 | import { DomainError } |
| 4 | |
| 5 | export class UnsupportedAvatarTypeError |
| 6 | status: number |
| 7 | |
| 8 | constructor(contentType: |
| 9 | super(`Unsupported avatar content type: ${contentType |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | export class EmptyAvatarError |
| 14 | status: number |
| 15 | |
| 16 | constructor() { |
| 17 | super('Avatar upload has no body'); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | export class AvatarNotFoundError |
| 22 | status: number |
| 23 | |
| 24 | constructor() { |
| 25 | super('Avatar not found'); |
| 26 | } |
| 27 | } |