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

Unclear message when querying by ID in REST for work item that does not exist #147

Open
rjmurillo opened this issue Jul 14, 2017 · 0 comments

Comments

@rjmurillo
Copy link
Member

Repro

var authType = AuthenticationTypes.PersonalAccessToken;
var options = new AuthenticationOptions(uri, authType, types => new VssCredentials[] { cred });
var fac = Microsoft.Qwiq.Client.Rest.WorkItemStoreFactory.Default;
var wis = fac.Create(options);
wis.Query(12345);

System.ArgumentNullException
Value cannot be null. Parameter name: item

   at Microsoft.Qwiq.Client.Rest.WorkItem..ctor(WorkItem item, Lazy`1 wit, Func`2 linkFunc)
   at Microsoft.Qwiq.Client.Rest.Query.CreateItemLazy(WorkItem workItem)
   at Microsoft.Qwiq.Client.Rest.Query.<RunQueryImplLazy>d__21.MoveNext()
   at Microsoft.Qwiq.ReadOnlyObjectWithNameCollection`1.Ensure()
   at Microsoft.Qwiq.ReadOnlyObjectWithNameCollection`1.GetEnumerator()
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at Microsoft.Qwiq.Client.Rest.WorkItemStore.Query(Int32 id, Nullable`1 asOf)
   at Castle.Proxies.Invocations.IWorkItemStore_Query_2.InvokeMethodOnTarget()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Microsoft.Qwiq.Exceptions.ExceptionHandlingDynamicProxy.Intercept(IInvocation invocation)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Qwiq.Exceptions.ExceptionHandlingDynamicProxy.Intercept(IInvocation invocation)
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.Proxies.IWorkItemStoreProxy.Query(Int32 id, Nullable`1 asOf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant