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

Check for JSON before parsing JSON in errors #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 20, 2021

  1. Check for JSON before parsing JSON in errors

    The createError function was incorrectly assuming that response
    bodies are in JSON format and attempting to extract useful details
    from that body.  But, for some error cases, the body is not JSON
    resulting in a error being thrown during the process of adding
    details to the error.
    
    This fix adds safeguards around the places that need JSON to enable
    the createError method to extract the useful details.
    JimPatterson committed Oct 20, 2021
    Configuration menu
    Copy the full SHA
    6c725cd View commit details
    Browse the repository at this point in the history