Skip to content

feat: Use elaborate errors value from API response if available - #3

Open
whisperity wants to merge 1 commit into
daltonbr:developmentfrom
whisperity:fix/report-full-error-instead-of-summary
Open

feat: Use elaborate errors value from API response if available#3
whisperity wants to merge 1 commit into
daltonbr:developmentfrom
whisperity:fix/report-full-error-instead-of-summary

Conversation

@whisperity

Copy link
Copy Markdown

This patch turns a "validation error"
(https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api#validation-failed) such as a "too long description" into an understandable "too long description" issue in the CI logs, instead of a simple "Validation failed" print-out.

Uses the corresponding structure from gh api:

{
  "message": "Validation Failed",
  "errors": "Validation failed: Description is too long (maximum is 140 characters)",
  "documentation_url": "https://docs.github.com/rest/commits/statuses#create-a-commit-status",
  "status": "422"
}

This patch turns a "validation error"
(https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api#validation-failed)
such as a "too long description" into an understandable "too long
description" issue in the CI logs, instead of a simple "Validation
failed" print-out.

Uses the corresponding structure from `gh api`:

```
{
  "message": "Validation Failed",
  "errors": "Validation failed: Description is too long (maximum is 140 characters)",
  "documentation_url": "https://docs.github.com/rest/commits/statuses#create-a-commit-status",
  "status": "422"
}
```
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