Example #1
0
        public HttpStatusCode MapToStatusCode(UseCaseExceptionCode code)
        {
            switch (code)
            {
            case UseCaseExceptionCode.FailedToAuthenticatedToInstagram:
                return(HttpStatusCode.Unauthorized);

            default:
                throw new InvalidEnumArgumentException(nameof(code), (int)code, typeof(UseCaseExceptionCode));
            }
        }
Example #2
0
 public UseCaseException(UseCaseExceptionCode statusCode, JObject errorObject) : this(statusCode, errorObject.ToString())
 {
     ContentType = @"application/json";
 }
Example #3
0
 public UseCaseException(UseCaseExceptionCode statusCode, Exception inner) : this(statusCode, inner.ToString())
 {
 }
Example #4
0
 public UseCaseException(UseCaseExceptionCode statusCode, string message) : base(message)
 {
     StatusCode = statusCode;
 }
Example #5
0
 public UseCaseException(UseCaseExceptionCode statusCode)
 {
     StatusCode = statusCode;
 }