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

opengovsg / FormSG / 9804531758

05 Jul 2024 07:28AM CUT coverage: 73.696% (-0.003%) from 73.699%
9804531758

push

github

g-tejas
refactor: organise into block groups based on origin

2230 of 3772 branches covered (59.12%)

Branch coverage included in aggregate %.

9240 of 11792 relevant lines covered (78.36%)

42.6 hits per line

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

75.0
/src/app/modules/auth/auth.errors.ts
1
import { ApplicationError, ErrorCodes } from '../core/core.errors'
57✔
2

3
export class InvalidDomainError extends ApplicationError {
57✔
4
  constructor(
5
    message = 'This is not a whitelisted public service email domain. Please log in with your official government or government-linked email address.',
17✔
6
  ) {
7
    super(message)
17✔
8
  }
9
}
10

11
export class InvalidOtpError extends ApplicationError {
57✔
12
  constructor(message = 'OTP has expired. Please request for a new OTP.') {
1✔
13
    super(message, undefined, ErrorCodes.AuthInvalidOtp)
20✔
14
  }
15
}
16

17
export class InvalidTokenError extends ApplicationError {
57✔
18
  constructor(message = 'Invalid API Key') {
×
19
    super(message, undefined, ErrorCodes.InvalidToken)
×
20
  }
21
}
22

23
export class MissingTokenError extends ApplicationError {
57✔
24
  constructor(message = "User's API Key not found") {
×
25
    super(message, undefined, ErrorCodes.MissingToken)
×
26
  }
27
}
28

29
export class UnauthorizedError extends ApplicationError {
57✔
30
  constructor(message = 'User is unauthorized.') {
29✔
31
    super(message, undefined, ErrorCodes.Unauthorized)
29✔
32
  }
33
}
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

© 2025 Coveralls, Inc