It's not in this direct code path, instead handled however core api exceptions are. Unless i misunderstand you :)
________________________________
From: Brendan Forster<mailto:notifications@github.com>
Sent: ý20/ý01/ý2014 19:12
To: octokit/octokit.net<mailto:octokit.net@noreply.github.com>
Cc: Andy Cross<mailto:andy@elastacloud.com>
Subject: Re: [octokit.net] Implement Repository Hooks (#313)


In Octokit.Tests/Clients/RepositoryHooksClientTest.cs:

> +                client.Hooks.Get("fake", "repo");
> +
> +                connection.Received().GetAll<RepositoryHook>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/hooks"));
> +            }
> +
> +            [Fact]
> +            public async Task EnsuresNonNullArguments()
> +            {
> +                var client = new RepositoriesClient(Substitute.For<IApiConnection>());
> +
> +                await AssertEx.Throws<ArgumentNullException>(async () => await client.Hooks.Get(null, "name"));
> +                await AssertEx.Throws<ArgumentNullException>(async () => await client.Hooks.Get("owner", null));
> +            }
> +        }
> +
> +        public class TheGetByIdMethod


What about a test here that we surface a NotFoundException when the id does not exist in the repo?

—
Reply to this email directly or view it on GitHub<https://github.com/octokit/octokit.net/pull/313/files#r9014830>.