diff --git a/cli/src/adapter.ts b/cli/src/adapter.ts index 0ad701825..9882470a0 100644 --- a/cli/src/adapter.ts +++ b/cli/src/adapter.ts @@ -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 } } diff --git a/cli/src/aggregator.ts b/cli/src/aggregator.ts index b00850617..a557f355e 100644 --- a/cli/src/aggregator.ts +++ b/cli/src/aggregator.ts @@ -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 } }