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

ringcentral / google-forms-notification-add-in / 9791264352

04 Jul 2024 08:44AM UTC coverage: 95.292% (+0.05%) from 95.238%
9791264352

push

github

embbnux
misc: filter data in logs

247 of 272 branches covered (90.81%)

Branch coverage included in aggregate %.

41 of 46 new or added lines in 9 files covered. (89.13%)

684 of 705 relevant lines covered (97.02%)

14.7 hits per line

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

73.91
/src/server/lib/logger.js
1

2
function logErrorResponse(response) {
3
  const status = response.status;
7✔
4
  const data = response.data;
7✔
5
  const headers = response.headers || {};
7!
6
  const rcRequestId = headers['rcrequestid'];
7✔
7
  console.error(
7✔
8
    'Response error: ', status,
9
    ' RequestId: ', rcRequestId,
10
    ' Data: ',
11
    data
12
  );
13
}
14

15
function errorLogger(error) {
16
  if (!error) {
13!
NEW
17
    return;
×
18
  }
19
  if (error.response) {
13✔
20
    // https://axios-http.com/docs/handling_errors
21
    // The request was made and the server responded with a status code
22
    logErrorResponse(error.response);
7✔
23
    return;
7✔
24
  }
25
  if (error.request) {
6!
26
    // The request was made but no response was received
NEW
27
    console.error('Request error: ', error.code);
×
NEW
28
    return;
×
29
  }
30
  console.error('Error: ', error.message);
6✔
31
}
32

33
exports.errorLogger = errorLogger;
4✔
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