Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dni
Copy link
Member

@dni dni commented Aug 21, 2024

usually we have code like that

    getAudit() {
      LNbits.api
        .request('GET', '/admin/api/v1/audit',
this.g.user.wallets[0].adminkey)
        .then(response => {
          this.auditData = response.data
          xonst myerror = isSwallowed()
        })
        .catch(function (error) {
          LNbits.utils.notifyApiError(error)
        })
    },

which if you make a mistake hides your error. logging console.error here again makes it easier to see what is happening while developing and does not hurt for the user aswell.

before:
screenshot-1724221016

after:
screenshot-1724221154

@codecov
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.32%. Comparing base (209cf7f) to head (5c9fd91).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2646      +/-   ##
==========================================
+ Coverage   57.62%   58.32%   +0.70%     
==========================================
  Files          75       75              
  Lines       11404    11404              
==========================================
+ Hits         6571     6651      +80     
+ Misses       4833     4753      -80     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dni dni requested review from arcbtc and talvasconcelos August 28, 2024 10:51
dni added 3 commits August 30, 2024 13:17
usually why have code like that
```
    getAudit() {
      LNbits.api
        .request('GET', '/admin/api/v1/audit',
this.g.user.wallets[0].adminkey)
        .then(response => {
          this.auditData = response.data
          xonst myerror = isSwallowed()
        })
        .catch(function (error) {
          LNbits.utils.notifyApiError(error)
        })
    },

```
which if you make a mistake hides your error. logging console.error here
again makes it easier to see what is happening while developing and
doesnt hurt for the user aswell
@dni dni force-pushed the log-frontend-error branch from 607f876 to 696422e Compare August 30, 2024 11:19
@arcbtc arcbtc merged commit 6e6b387 into dev Aug 30, 2024
@arcbtc arcbtc deleted the log-frontend-error branch August 30, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants