You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple test application enumerates sites and their hostnames:
static void apitest()
{
var authInfo = new AuthInfo(ACCESS_TOKEN);
var ah = new AppHarborClient(authInfo);
foreach (var application in ah.GetApplications())
{
Console.WriteLine("----");
Console.WriteLine(application.Name);
Console.WriteLine(application.Slug);
Console.WriteLine(application.Url);
var hostnames = ah.GetHostnames(application.Slug);
foreach (var hostname in hostnames)
{
Console.WriteLine(" * " + hostname.Id);
Console.WriteLine(" * " + hostname.Value);
Console.WriteLine(" * " + hostname.Url);
Console.WriteLine(" * " + hostname.Canonical);
}
}
}
It blow ups at GetHostnames:
Test 'M:AppHarborTest.Program.apitest' failed: Value cannot be null.
Parameter name: url
System.ArgumentNullException: Value cannot be null.
Parameter name: url
AppHarborClient.cs(184,0): at AppHarbor.AppHarborClient.CheckArgumentNull(String argumentName, Object value)
AppHarborClient.cs(51,0): at AppHarbor.AppHarborClient.ExtractId(Uri url)
AppHarborClient.cs(103,0): at AppHarbor.AppHarborClient.ExecuteGetListKeyed[T](RestRequest request)
AppHarborClient.Hostname.cs(29,0): at AppHarbor.AppHarborClient.GetHostnames(String applicationSlug)
Program.cs(50,0): at AppHarborTest.Program.apitest()
The failing code is in: AppHarborClient.ExecuteGetListKeyed:
foreach (var item in data)
{
item.Id = ExtractId(item.Url);
}
ExtractId() is throwing on a null URL.
Looking at the traffic over fiddler:
GET https://appharbor.com/applications/my-slug/hostnames
I have a simple test application enumerates sites and their hostnames:
It blow ups at
GetHostnames
:The failing code is in:
AppHarborClient.ExecuteGetListKeyed
:ExtractId()
is throwing on a null URL.Looking at the traffic over fiddler:
Returns:
Looking at the others it seems for the default
apphb
URLs thaturl
us alwaysnull
.The text was updated successfully, but these errors were encountered: