Passed
Pull Request — master (#189)
by
unknown
01:52
created

src/errors/NetworkError.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 21
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 21
rs 10
c 0
b 0
f 0
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A NetworkError.constructor 0 4 1
1
'use strict';
2
3
const OAuthError = require('./OAuthError');
4
5
/**
6
 * Error class for network related errors
7
 * @extends OAuthError
8
 */
9
class NetworkError extends OAuthError {
10
  /**
11
   * Create a new NetworkError
12
   * @param {string} message - Error message
13
   * @param {string} intuitTid - Intuit transaction ID
14
   */
15
  constructor(message, intuitTid) {
16
    super(message, 'NETWORK_ERROR', 'Network request failed', intuitTid);
17
    this.name = 'NetworkError';
18
  }
19
}
20
21
module.exports = NetworkError;