nmklotas / GitLabApiClient

GitLab API client
MIT License
265 stars 159 forks source link

The "checking" merge_status are missing on MergeStatus Model #118

Open yteruel31 opened 4 years ago

yteruel31 commented 4 years ago

Version : 1.4.0

When I want to create a MergeRequest with these following instruction :

await _client.MergeRequests.CreateAsync("projectId", new CreateMergeRequest("issue/1", "master", "Title")
{
    Description = "Closes #1",
    RemoveSourceBranch = true
});

My app throw this exception :

System.AggregateException
  HResult=0x80131500
  Message=Une ou plusieurs erreurs se sont produites.
  Source=PGM.GUI
  StackTrace:
   at PGM.GUI.Utilities.CustomCommand.<>c__DisplayClass11_0.<HandleErrors>b__0(Object o) in D:\GIT\projectgitmanager\PGM.GUI\Utilities\CustomCommand.cs:line 89
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at PGM.GUI.App.Main()

  This exception was originally thrown at this call stack:
    Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(System.Type, Newtonsoft.Json.Serialization.NamingStrategy, string, bool)
    Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(Newtonsoft.Json.JsonReader, System.Type, object, Newtonsoft.Json.JsonSerializer)

Inner Exception 1:
JsonSerializationException: Error converting value "checking" to type 'GitLabApiClient.Models.MergeRequests.Responses.MergeStatus'. Path 'merge_status', line 1, position 791.

Inner Exception 2:
ArgumentException: Requested value 'checking' was not found.
tpayne84 commented 4 years ago

Following this thread.