Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stringify response data instead of whole response #43

Merged

Conversation

ryanburr
Copy link
Contributor

@ryanburr ryanburr commented Jul 11, 2023

Changes

  • fixes a circular structure error by stringifying error.response.data
  • adds a couple of console logs

Background

I started receiving the following error in my GitHub action:

JIRA key found -> ***-***
Fetching ***-*** details from JIRA
JIRA key was not found
Error: Converting circular structure to JSON
    --> starting at object with constructor 'ClientRequest'
    |     property 'socket' -> object with constructor 'TLSSocket'
    --- property '_httpMessage' closes the circle

I believe this is related to the way the error response is being used, which is preventing the real error from being logged.

@cakeinpanic cakeinpanic self-requested a review August 31, 2023 11:05
Copy link
Owner

@cakeinpanic cakeinpanic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change, thank you!

@cakeinpanic cakeinpanic merged commit 692e1a8 into cakeinpanic:master Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants