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

mozilla / blurts-server / #11898

pending completion
#11898

push

circleci

web-flow
Merge pull request #2770 from mozilla/license

Add license headers in source files

282 of 1138 branches covered (24.78%)

Branch coverage included in aggregate %.

959 of 3049 relevant lines covered (31.45%)

2.55 hits per line

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

0.0
/src/utils/error.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
class UserInputError extends Error {
6
  constructor (...params) {
7
    super(...params)
×
8
    this.statusCode = 400
×
9
  }
10
}
11

12
class UnauthorizedError extends Error {
13
  constructor (...params) {
14
    super(...params)
×
15
    this.statusCode = 403
×
16
  }
17
}
18

19
class NotFoundError extends Error {
20
  constructor (...params) {
21
    super(...params)
×
22
    this.statusCode = 404
×
23
  }
24
}
25
class MethodNotAllowedError extends Error {
26
  constructor (...params) {
27
    super(...params)
×
28
    this.statusCode = 405
×
29
  }
30
}
31

32
class RateLimitError extends Error {
33
  constructor (...params) {
34
    super(...params)
×
35
    this.statusCode = 429
×
36
  }
37
}
38

39
export {
40
  UnauthorizedError,
41
  UserInputError,
42
  NotFoundError,
43
  MethodNotAllowedError,
44
  RateLimitError
45

46
}
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