Commit Graph

53 Commits

Author SHA1 Message Date
Alexander Efremov d7d03fafa3 Redundant parentheses were removed. (#1275) 2016-04-21 16:15:26 +10:00
Devesh Khandelwal cdd46465db Add custom exception for the HTTP 451 response (#1239)
* Add HTTP 451: Legal Takedown Exception.

* Add LegalRestrictionException in HandleErrors.

* Cast 451 to HttpStatusCode and include exception in csproj files.

* Tests added and "FixProjects".

* Fix: 403 -> 451 in 451Tests.
2016-04-10 14:07:18 -04:00
aedampir@gmail.com 695cf8e75b Unused "using" directives were removed in whole solution. 2016-03-25 13:38:07 +07:00
Brendan Forster 6bedf1ee9b just a bit of code cleanup 2016-02-02 10:01:16 +10:30
Brendan Forster 238b138b16 Merge pull request #995 from naveensrinivasan/mono
Targeting mono
2015-12-18 10:34:43 +10:30
Mordechai Zuber 44304ca70b use string per recommended style 2015-12-16 21:23:36 +02:00
naveen ebbec94888 Merge branch 'octokit/master' into mono 2015-12-15 17:32:52 -05:00
Haacked 4fdb8f4368 Remove unnecessary base call on default ctor 2015-12-13 22:23:10 -08:00
naveen 85e520d5d6 Fixes for mono
removed DocPlagiarizer

Fixed tests

removed unused variable

removed unused variable that was causing the build to fail

fixed the file name casing.

updated the nugget.exe to download System.Net.Http

PCL is required for mono

more fixes for travis
2015-12-11 20:36:47 -05:00
Anton Sizikov cde2518b86 String comparison specified for content type 2015-12-10 08:53:12 +01:00
Anton Sizikov 2af1f240e8 Merge branch 'master' into api-exception-prints-payload-on-tostring 2015-12-10 08:31:58 +01:00
Anton Sizikov a7e06c7cd0 Removed custom message format and just print raw body 2015-12-08 10:10:59 +01:00
Haacked 4fe8e96060 Merge branch 'better-merge-exception-rebased' of https://github.com/elbaloo/octokit.net into elbaloo-better-merge-exception-rebased 2015-12-07 15:13:13 -08:00
Anton Sizikov 5ef499686e Overrided ToString methods for ApiException and ApiError 2015-12-06 19:34:32 +01:00
Henrik Andersson c4b4233683 Throw exception with helpful message if duplicate webhook config values exists. 2015-11-11 23:07:28 +10:00
Brendan Forster 80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Brendan Forster 1408866d43 Merge branch 'gitignore-exception' 2015-11-04 09:16:33 -08:00
Victor Castillo Escoto 25d39a055e Make new merge exceptions inherit from 'Octokit.ApiException'
Affect 'Octokit.PullRequestNotMergeableException'
and 'Octokit.PullRequestMismatchException'
2015-10-13 19:53:38 -05:00
Brendan Forster db57a92a7e sketching out the exception necessary when raising specific merge exceptions 2015-10-09 09:05:17 -05:00
Victor Castillo Escoto d5b5545f5b Add .com links to PrivateRepositoryQuotaExceededException
Add following links:
- 'Deleting a repository' at https://help.github.com/articles/deleting-a-repository/
- 'What plan should I use?' at https://help.github.com/articles/what-plan-should-i-choose/
2015-10-07 12:14:05 -04:00
William Barbosa 7dee540afd Throwing proper exception on RepositoresClient 2015-10-04 10:12:34 -03:00
William Barbosa 0b5f3e9611 Adds InvalidGitIgnoreTemplateException 2015-10-02 19:25:46 -03:00
Haacked 8a7e5efa81 Use base type for argument 2015-08-04 21:20:15 -07:00
Haacked eb5d14cfdc Organize usings and remove unused 2015-08-04 21:12:37 -07:00
Brendan Forster b191ebc3cd extract specific exception for when invalid paths raised 2015-07-19 07:44:59 +09:30
Haacked 2e2009f6e8 Fix some typos 2015-04-19 22:20:52 -07:00
Haacked 93dd16f829 Add more info to TwoFactorChallengeFailedException
I was running into an issue where i wanted more information from the
TwoFactorChallengeFailedException. It turns out, the exception could
easily provide both the TwoFactorType AND the authentication code
provided. So 💥!
2015-04-19 19:42:13 -07:00
Brendan Forster 47c0540165 Merge pull request #662 from octokit/haacked/api-response-refactor
Make the response objects readonly.
2015-01-28 09:31:27 +10:30
Gabriel Weyer 1b1a397a09 RepositoryExistsException has now two constructors (one for account and one for organization) 2015-01-08 17:09:08 +11:00
Haacked 89e8fdfeaf Make Response.Body readonly 2015-01-04 19:15:40 -08:00
Haacked d8f50292e3 Stop manufacturing Response objects just to create an exception 2015-01-04 19:15:38 -08:00
Haacked 53a6516de2 Change IResponse.Body to object
This removes the awkward Body and BodyAsObject property combo we used to
have.
2015-01-04 19:06:50 -08:00
Haacked be9f446df4 Move Response to its own file and Internal namespace
A class named "Response" could conflict with a lot of things.
2015-01-04 19:03:25 -08:00
Haacked 4c8bab20eb IApiResponse no longer inherits IResponse 2015-01-04 18:58:53 -08:00
Haacked 9f675924b7 Make response models readonly
It's bothered me that our response models are mutable. They really
shouldn't be. I made the properties have a protected setter instead of
private to provide flexibility for others who might be deriving from
these classes or testing them.

Fixes #650
2015-01-03 20:21:36 -08:00
Brendan Forster 3be89e7c01 document a bunch of the Exceptions namespace 2015-01-03 09:30:05 -08:00
Cameron MacFarland f6c42b78c5 Fixing xml docs 2014-06-10 09:03:27 +08:00
Brendan Forster e0dab3ea8b fix impacted tests, live a happy life 2014-04-30 13:52:42 +08:00
Brendan Forster 74b6e93fae deprecated field which is no longer necessary 2014-04-30 13:35:12 +08:00
Brendan Forster 46afc41015 making some of the additional fields less wrong 2014-04-30 13:34:36 +08:00
Brendan Forster ac89fe07da adjusting exception message to not rely on credentials 2014-04-30 13:25:14 +08:00
Haacked 34ac57ccab Add exception for exceeding the private quota 2014-02-18 22:47:45 -08:00
Haacked dae6cb2ca6 Implement RepositoryExistsException
This exception is thrown when we try to create a repository but it
already exists on the server.
2014-02-18 21:03:29 -08:00
Haacked 70b94187b3 Add NotFoundException for 404 status 2013-10-23 14:46:59 -07:00
Haacked 14ad942ea8 RateLimit class encapsulates rate limit headers
Added a RateLimit class to encapsulate pulling rate limit information
from the headers. This is now exposed by ApiInfo as well as the
RateLimitExceeededException. That way these two classes are not grabbing
the same information in different ways which we were doing before.
2013-10-18 14:49:00 -07:00
Haacked f9089784f9 Fixing up the defaults a bit 2013-10-18 11:33:21 -07:00
Haacked c87944c884 Add default messages for custom exceptions
Right now, our exception messages come from the API response in most
cases. But if for any reason there isn't one, we supply a default. I
realized these messages might make it to people's logs so it might be
nice to spend time later making them even more useful.
2013-10-18 11:08:56 -07:00
Haacked a1887837be Implement 403 exception handling
This implements exception handling for the various 403 cases based off
of the Octokit.rb implementation.
https://github.com/octokit/octokit.rb/blob/master/lib/octokit/error.rb

Fixes #85
2013-10-17 22:22:56 -07:00
Haacked e98e46c728 Make ApiError is never null 2013-10-10 22:11:49 -07:00
Haacked ae41b81025 Address code review changes and add XML comments 2013-10-10 14:22:09 -07:00