-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add custom exception for the HTTP 451 response #1239
Conversation
@devkhan just added a task to ensure the files are synced across all the projects |
@ryangribble The Travis Linux build is failing. Can you please review? |
[Fact] | ||
public void HasDefaultMessage() | ||
{ | ||
var response = new Response(HttpStatusCode.Forbidden, null, new Dictionary<string, string>(), "application/json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt the status code here be the HTTP 451 (not Forbidden?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really sorry for this, I'll fix this. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologosie! Everyone's contributions are much appreciated 😀
LGTM 👍 |
Should I add some integration tests using one of the repos from http://github.com/github/dmca ? |
@devkhan don't worry about it. I think this area of the codebase is rather boring and unit tests are good enough coverage for the error code handling... |
Implements #1237.
As per this blog post.
GitHub API will now return a HTTP 451 response (rather than a 403) when a repository or gist cannot be accessed due to a DMCA notice.
Checklist:
HandleErrors
..\build FixProjects
/cc @ryangribble