How to detect error base on RestSharp returned response fields?
Never check ErrorMessage for detecting error, just check StatusCode.
Note. This picture is In case of using Asp Web Api 2, doesn't has ErrorMessage but has System.Net.HttpStatusCode.NotFound status. (See all http status codes)
No comments:
Post a Comment