aedampir@gmail.com
d0c8e82453
Red Tests were fixed
...
Unused 'using' directive were removed.
2016-04-18 12:46:13 +07: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
7e4e874f19
Misspelling Attepmts -> Attempts was fixed.
2016-03-23 22:30:24 +07:00
Brendan Forster
6bedf1ee9b
just a bit of code cleanup
2016-02-02 10:01:16 +10:30
Anton Sizikov
a7e06c7cd0
Removed custom message format and just print raw body
2015-12-08 10:10:59 +01:00
Anton Sizikov
3f8ed4a882
Unit test fixed
2015-12-06 19:37:11 +01:00
Anton Sizikov
5ef499686e
Overrided ToString methods for ApiException and ApiError
2015-12-06 19:34:32 +01:00
Brendan Forster
80719c0033
aaaand format the code
2015-11-04 13:38:51 -08: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
4653e798a7
Make Response.StatusCode readonly
2015-01-04 19:15:42 -08:00
Haacked
89e8fdfeaf
Make Response.Body readonly
2015-01-04 19:15:40 -08:00
Haacked
ff3506f3e8
Make some of the IResponse properties readonly
2015-01-04 19:13:32 -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
ba0a7673ec
Make ApiError.Errors a readonly list
...
Also added a test for it.
2015-01-03 20:22:30 -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
31e9577599
added some more tests
2014-04-30 13:32:19 +08:00
Brendan Forster
ac89fe07da
adjusting exception message to not rely on credentials
2014-04-30 13:25:14 +08: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
db2f805bc8
Support requests with HttpContent body
...
If a 3rd party client needs to provide a specific HttpContent, we should
allow that in the adapter. Our clients probably shouldn't do this as it
would break encapsulation.
2013-10-11 14:34:09 -07:00
Haacked
e98e46c728
Make ApiError is never null
2013-10-10 22:11:49 -07:00
half-ogre
6f3fa81789
move internal stuff to .Internal namespace
2013-10-08 15:14:06 -07:00
Haacked
b567097a38
Change RT unit tests assembly name
2013-10-02 16:33:39 -07:00
Haacked
a39a80cc88
Add exception handling for non-OK status codes
2013-10-02 16:17:36 -07:00