public HttpStatusCode MapToStatusCode(UseCaseExceptionCode code) { switch (code) { case UseCaseExceptionCode.FailedToAuthenticatedToInstagram: return(HttpStatusCode.Unauthorized); default: throw new InvalidEnumArgumentException(nameof(code), (int)code, typeof(UseCaseExceptionCode)); } }
public UseCaseException(UseCaseExceptionCode statusCode, JObject errorObject) : this(statusCode, errorObject.ToString()) { ContentType = @"application/json"; }
public UseCaseException(UseCaseExceptionCode statusCode, Exception inner) : this(statusCode, inner.ToString()) { }
public UseCaseException(UseCaseExceptionCode statusCode, string message) : base(message) { StatusCode = statusCode; }
public UseCaseException(UseCaseExceptionCode statusCode) { StatusCode = statusCode; }