Skip to content

Instantly share code, notes, and snippets.

Created June 19, 2015 20:39
What would you like to do?
OneDrive Error Code Handling
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Microsoft.OneDrive
public class OneDriveError
public OneDriveInnerError Error { get; set; }
public static OneDriveError FromJson(string json)
return JsonConvert.DeserializeObject<OneDriveError>(json);
public bool IsError(string expectedErrorCode)
OneDriveInnerError errorCode = this.Error;
while (null != errorCode)
if (errorCode.Code == expectedErrorCode)
return true;
errorCode = errorCode.InnerError;
return false;
public class OneDriveInnerError
public string Code { get; set; }
public string Message { get; set; }
public OneDriveInnerError InnerError { get; set; }
Copy link

Hello Microsoft why to much error code can't you fix it? is be long time sence is problem started??????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment