Skip to content

provide a better missing error message #76

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

Merged
merged 1 commit into from
Oct 16, 2013
Merged

provide a better missing error message #76

merged 1 commit into from
Oct 16, 2013

Conversation

ghost
Copy link

@ghost ghost commented Sep 25, 2013

When github say's missing, it's not talking about the resource - it means something referenced in the data.

For example, specifying a milestone that doesn't exist will return:

{
    "message": "Validation Failed"
    "documentation_url": "http"://developer.github.com/v3"
    "errors": [
        {
            "value": 42,
            "resource": "Issue",
            "field": "milestone",
            "code": "missing"
        }
    ]
}

Previously this would be reported as:

Validation Failed: Resource "Issue" not exists anymore

Now it's reported as

Validation Failed: The milestone 42 does not exist, for resource "Issue"

When github say's missing, it's not talking about the resource - it
means something referenced in the data.

For example, specifying a milestone that doesn't exist will return:

```
{
	"message": "Validation Failed"
	"documentation_url": "http"://developer.github.com/v3"
	"errors": [
		{
			"value": 42,
			"resource": "Issue",
			"field": "milestone",
			"code": "missing"
		}
	]
}
```

Previously this would be reported as:

> Validation Failed: Resource "Issue" not exists anymore

Now it's reported as

> The milestone 42 doesa not exist, for resource "Issue"
cursedcoder pushed a commit that referenced this pull request Oct 16, 2013
provide a better missing error message
@cursedcoder cursedcoder merged commit ce011c3 into KnpLabs:master Oct 16, 2013
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