node-flyway icon indicating copy to clipboard operation
node-flyway copied to clipboard

Log input string when JSON parsing fails (fixes domdinnes#32)

Open cadam11 opened this issue 1 year ago • 0 comments

Fix: Add Logging for Unparseable JSON Responses

Description

This PR addresses issue #32, which reports errors when users run commands through the wrapper, resulting in unparseable JSON responses.

Changes Made

  • Error Handling: Added logging for unparseable JSON responses to aid in troubleshooting.
    • Modified the first JSON.parse attempt to log the raw response if a SyntaxError is caught.

cadam11 avatar Aug 07 '24 23:08 cadam11