Skip to content

Commit

Permalink
fix: update err msg handling from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Mar 15, 2024
1 parent e43ed29 commit 8d33f97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cli/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ export function hashHandler() {
return adapterWithCorrectHash
} catch (e) {
console.error('Adapter hash could not be computed. Reason:')
const errMsg = e?.response?.data?.message ? e.response.data.message : e.message
const errMsg = e?.response?.data ? e.response.data : e.message

console.error(errMsg)
console.error(e.response.data)
return errMsg
}
}
Expand Down
5 changes: 3 additions & 2 deletions cli/src/aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ export function hashHandler() {
return aggregatorWithCorrectHash
} catch (e) {
console.error('Aggregator hash could not be computed. Reason:')
const errMsg = e?.response?.data?.message ? e.response.data.message : e.message
console.error(errMsg)
const errMsg = e?.response?.data ? e.response.data : e.message

console.error(e.response.data)
return errMsg
}
}
Expand Down

0 comments on commit 8d33f97

Please sign in to comment.