-2

Is there any list of error codes for Live REST Api?

I've tried to search in reference without success. I've found one post at MSDN forum and the answer says that it doesn't exist.

Then so how should I differentiate errors? For example invalid token, token expired, other.

Should I refresh token every time I get error just because I cannot compare it with reference?

Romasz
  • 29,662
  • 13
  • 79
  • 154

1 Answers1

1

Unfortunately, we don't have error codes in the reference documents. I understand this is important and will see what we can do to get the information added.

In the case of authentication errors like invalid token or token expired, refreshing the token would be the route to go. Invalid token means we're not able to parse the token or there's something invalid in the data. Token expired means the token is expired.

Any other authentication errors fall under the third error code. In this case, it's usually something on our side that went wrong and retrying the call or refreshing the token should help.

ginach
  • 454
  • 2
  • 6
  • Yes in some cases proper identification of error is crucial for further processing. Now I cannot inform the user what had happened that he wasn't able to see his data. You are also right than in most cases refreshing the Token should help. It is somehow weird that documentation lacks list of possible errors, but I understand that there must be a reason. Are you somehow connected with Onedrive developers? – Romasz Apr 24 '14 at 18:39
  • 1
    Yes, I am one of the OneDrive developers. I agree that not having errors in the documentation is a bad experience and am working with the rest of the feature team to figure out how to get them there. – ginach Apr 24 '14 at 23:43
  • 1
    You can find this information here (http://msdn.microsoft.com/en-us/library/dn631844.aspx) now – Jeanine M S May 19 '14 at 16:29