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

NetworkError   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A 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;