Skip to content

Commit

Permalink
Additional logging when proxy block requests to lightspeed (#1490)
Browse files Browse the repository at this point in the history
* additional logging when proxy block requests to lightspeed

* add istanbul ignore for error logging
  • Loading branch information
robinbobbitt authored Aug 3, 2024
1 parent a2c4e3f commit 6b0ca57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/features/lightspeed/lightSpeedOAuthProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ export class LightSpeedAuthenticationProvider
"[ansible-lightspeed-oauth] error message: ",
error.message,
);
/* istanbul ignore next */
console.error(
"[ansible-lightspeed-oauth] error response data: ",
error.response?.data,
);
throw new Error("An unexpected error occurred");
} else {
console.error("[ansible-lightspeed-oauth] unexpected error: ", error);
Expand Down
5 changes: 5 additions & 0 deletions src/features/lightspeed/lightspeedUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ export class LightspeedUser {
this._logger.error(
`[ansible-lightspeed-user] error message: ${error.message}`,
);
/* istanbul ignore next */
console.error(
"[ansible-lightspeed-user] error response data: ",
error.response?.data,
);
throw new Error(error.message);
} else {
this._logger.error(
Expand Down

0 comments on commit 6b0ca57

Please sign in to comment.