• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

opengovsg / FormSG / 9951990292

16 Jul 2024 06:53AM UTC coverage: 73.438% (+0.2%) from 73.22%
9951990292

push

github

Ken
chore: update dockerfile casing

2280 of 3864 branches covered (59.01%)

Branch coverage included in aggregate %.

9313 of 11922 relevant lines covered (78.12%)

43.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/app/modules/bounce/bounce.errors.ts
1
import {
2
  InvalidNumberError,
3
  SmsSendError,
4
} from '../../services/postman-sms/postman-sms.errors'
5
import { ApplicationError, ErrorCodes } from '../core/core.errors'
4✔
6

7
/**
8
 * Unexpected shape of request body.
9
 */
10
export class InvalidNotificationError extends ApplicationError {
4✔
11
  constructor(message = 'Notification from AWS could not be validated') {
3✔
12
    super(message, undefined, ErrorCodes.BOUNCE_INVALID_NOTIFCATION)
3✔
13
  }
14
}
15

16
/**
17
 * Error while sending bounce-related notification to form admins via SMS.
18
 */
19
export class SendBounceSmsNotificationError extends ApplicationError {
4✔
20
  meta: {
21
    contact: string
22
    originalError: SmsSendError | InvalidNumberError
23
  }
24

25
  constructor(
26
    originalError: SmsSendError | InvalidNumberError,
27
    contact: string,
28
    message = 'Error while sending bounce notification via SMS',
1✔
29
  ) {
30
    super(message, undefined, ErrorCodes.BOUNCE_SEND_BOUNCE_SMS_NOTIFICATION)
1✔
31
    this.meta = {
1✔
32
      contact,
33
      originalError,
34
    }
35
  }
36
}
37

38
/**
39
 * Email headers are missing the custom headers containing form and submission IDs.
40
 */
41
export class MissingEmailHeadersError extends ApplicationError {
4✔
42
  constructor(
43
    message = 'Email is missing custom header containing form or submission ID',
2✔
44
  ) {
45
    super(message, undefined, ErrorCodes.BOUNCE_MISSING_EMAIL_HEADERS)
2✔
46
  }
47
}
48

49
/**
50
 * Error while parsing notification
51
 */
52
export class ParseNotificationError extends ApplicationError {
4✔
53
  constructor(message = 'Could not parse SNS notification') {
×
54
    super(message, undefined, ErrorCodes.BOUNCE_PARSE_NOTIFICATION)
×
55
  }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc