Skip to content

Conversation

@Dkamps18
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

Historically when the API returned an error the CLI would include a data array in the json response being printed out, however this data array is not returned from the api.
API response

{
	"error": "Not Found",
	"message": "404: Not Found",
	"status": 404
}

CLI Output

{
	"data": [],
	"error": "Not Found",
	"message": "404: Not Found",
	"status": 404
}

Description of Changes:

  • Don't initialize an array when data is nil and there is an error message

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

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.

1 participant