Improve Wise error message after previous change

This commit is contained in:
Jan Oberhauser 2022-03-06 11:41:50 +01:00
parent f350b9e1c0
commit af09bf8e6a

View file

@ -108,7 +108,7 @@ export async function wiseApiRequest(
throw new NodeApiError(this.getNode(), {message: 'SCA request failed, check your private key is valid'});
}
} else {
throw new NodeApiError(this.getNode(), {headers: response.headers, body: response.body},);
throw new NodeApiError(this.getNode(), { ...response, message: response.statusMessage });
}
}