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

when an array of errors are returned, ensure they are readable #88

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

jgravois
Copy link
Collaborator

@jgravois jgravois commented Nov 4, 2019

GitHub sometimes returns an array of errors instead of just one. this tweak ensures that they can be quickly parsed visually.

related: #82

> [object Object],[object Object],[object Object]

becomes

> [{"resource":"Release","code":"custom","field":"tag_name","message":"tag_name is not a valid tag"},{"resource":"Release","code":"custom","message":"Published releases must have a valid tag"},{"resource":"Release","code":"invalid","field":"target_commitish"}]
# etc. etc. 

```bash
> [object Object],[object Object],[object Object]
```
becomes
```bash
> [{"resource":"Release","code":"custom","field":"tag_name","message":"tag_name is not a valid tag"},{"resource":"Release","code":"custom","message":"Published releases must have a valid tag"},{"resource":"Release","code":"invalid","field":"target_commitish"}]
```
Copy link
Owner

@ungoldman ungoldman left a comment

Choose a reason for hiding this comment

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

👍

@jgravois jgravois merged commit f8e39f3 into master Nov 4, 2019
@jgravois jgravois deleted the patch branch November 4, 2019 17:13
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