Skip to content

Instantly share code, notes, and snippets.

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; }

This comment has been minimized.

Copy link

ibrahimfandauda commented Jun 30, 2015

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
You can’t perform that action at this time.