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

Implement RepositoryExistsException #377

Merged
merged 1 commit into from
Feb 19, 2014

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Feb 19, 2014

This exception is thrown when we try to create a repository but it
already exists on the server.

Wanted to get some eyes on this early. This is ready to merge. I plan to take the same approach for:

  1. OverPrivateRepositoryQuotaException
  2. CannotCreatePrivateRepositoryOnFreePlanException (not sure this is doable in Octokit.net yet).

^^^ I could use help naming those better. :)

@@ -53,7 +60,7 @@ public override string Message

public ApiError ApiError { get; private set; }

static ApiError GetApiErrorFromExceptionMessage(IResponse response)
internal static ApiError GetApiErrorFromExceptionMessage(IResponse response)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignore this change. This was a different road I was planning to take, but decided against. I'll revert it.

@haacked
Copy link
Contributor Author

haacked commented Feb 19, 2014

Doh! I'll add these files.

@pmacn
Copy link

pmacn commented Feb 19, 2014

OverPrivateRepositoryQuotaException

PrivateRepositoryQuotaExceededException

CannotCreatePrivateRepositoryOnFreePlanException

I don't think this can be improved on. It's perfection.

This exception is thrown when we try to create a repository but it
already exists on the server.
@shiftkey
Copy link
Member

:shipit:

shiftkey added a commit that referenced this pull request Feb 19, 2014
…ions

Implement RepositoryExistsException
@shiftkey shiftkey merged commit 8fa98fa into master Feb 19, 2014
@shiftkey shiftkey deleted the haacked/repository-create-exceptions branch February 19, 2014 06:39
@haacked
Copy link
Contributor Author

haacked commented Feb 19, 2014

From an API perspective, CannotCreatePrivateRepositoryOnFreePlanException is the same thing as PrivateRepositoryQuotaExceededException in that we get the same response. So if we wanted to distinguish that, we'd have to do it from context we have on the client side.

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.

3 participants