Skip to content

Commit d4944bd

Browse files
authored
Merge pull request #189 from codefresh-io/dev-debug-500-responses
debug response body in the case of error
2 parents c9b02e6 + 0494139 commit d4944bd

File tree

3 files changed

+2900
-417
lines changed

3 files changed

+2900
-417
lines changed

lib/logic/api/helper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const sendHttpRequest = async (httpOptions, authContext, throwOnUnauthorized) =>
3333
try {
3434
response = await rp(finalOptions);
3535
} catch (err) {
36+
debug('Response:\n%O', err.response.body);
37+
3638
if (_.isEqual(err.statusCode, 401)) {
3739
const error = new CFError({
3840
cause: err,

0 commit comments

Comments
 (0)