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

opengovsg / formsg-javascript-sdk / 13652596553

04 Mar 2025 11:24AM UTC coverage: 97.495%. First build
13652596553

push

github

littlemight
fix: upgrade actions/cache

104 of 114 branches covered (91.23%)

Branch coverage included in aggregate %.

363 of 365 relevant lines covered (99.45%)

6.57 hits per line

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

89.19
/src/errors.ts
1
class MissingSecretKeyError extends Error {
4✔
2
  constructor(
3
    message = 'Provide a secret key when initializing the FormSG SDK to use this function.'
5✔
4
  ) {
5
    super(message)
3!
6
    this.name = this.constructor.name
3✔
7

8
    // Set the prototype explicitly.
9
    // See https://github.com/facebook/jest/issues/8279
10
    Object.setPrototypeOf(this, MissingSecretKeyError.prototype)
3✔
11
  }
12
}
4✔
13
class MissingPublicKeyError extends Error {
4✔
14
  constructor(
15
    message = 'Provide a public key when initializing the FormSG SDK to use this function.'
3✔
16
  ) {
17
    super(message)
2!
18
    this.name = this.constructor.name
2✔
19

20
    // Set the prototype explicitly.
21
    // See https://github.com/facebook/jest/issues/8279
22
    Object.setPrototypeOf(this, MissingPublicKeyError.prototype)
2✔
23
  }
24
}
4✔
25

26
class WebhookAuthenticateError extends Error {
4✔
27
  constructor(message: string) {
28
    super(message)
5!
29
    this.name = this.constructor.name
5✔
30
    // Set the prototype explicitly.
31
    // See https://github.com/facebook/jest/issues/8279
32
    Object.setPrototypeOf(this, WebhookAuthenticateError.prototype)
5✔
33
  }
34
}
4✔
35

36
class AttachmentDecryptionError extends Error {
4✔
37
  constructor(message = 'Attachment decryption with the given nonce failed.') {
2✔
38
    super(message)
1!
39
    this.name = this.constructor.name
1✔
40
  }
41
}
4✔
42

43
export {
44
  MissingSecretKeyError,
4✔
45
  MissingPublicKeyError,
4✔
46
  WebhookAuthenticateError,
4✔
47
  AttachmentDecryptionError,
4✔
48
}
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