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

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

04 Jul 2024 09:03AM UTC coverage: 95.112% (-0.1%) from 95.238%
9791525289

push

github

web-flow
misc: filter data in logs (#67)

* misc: filter data in logs

* misc: filter code

248 of 274 branches covered (90.51%)

Branch coverage included in aggregate %.

43 of 49 new or added lines in 9 files covered. (87.76%)

686 of 708 relevant lines covered (96.89%)

14.94 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