Esempio n. 1
0
        public bool HasBookAnyImage(long projectId)
        {
            try
            {
                m_client.Head($"book/{projectId}/image");
                return(true);
            }
            catch (HttpRequestException e)
            {
                var statusException = e as HttpErrorCodeException;
                if (statusException?.StatusCode == HttpStatusCode.NotFound)
                {
                    return(false);
                }

                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }