Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Improved error handling for bad responses
Browse files Browse the repository at this point in the history
Added unit tests
Updated coverage config
Bumped minor dependencies
  • Loading branch information
shawn-sher committed Sep 15, 2022
1 parent 777a842 commit f7286f6
Show file tree
Hide file tree
Showing 5 changed files with 768 additions and 717 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
- run: npm run test:unit:local
- name: Upload coverage report to CodeCov
if: ${{ matrix.node-version == '16.x' }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: coverage/clover.xml # optional
files: coverage/clover.xml # optional
fail_ci_if_error: true # optional (default = false)
verbose: true
- name: Publish to NPM
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ class CerberusClient {
let response
try {
response = await this._executeRequest(Object.assign({}, { json: true }, requestConfig))
if (!response) {
throw new Error('No response was returned from Cerberus')
}
} catch (error) {
const msg = 'There was an error executing a call to Cerberus.\nmsg: \'' + error.message + '\''
this._log(msg)
Expand Down
Loading

0 comments on commit f7286f6

Please sign in to comment.