Commit 96ce8ee9 authored by Andreas Müller's avatar Andreas Müller
Browse files

Moving exception classes to sub-namespace "Exceptions"

parent 707adec0
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -6,6 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Enums;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
using System;
using System.Threading.Tasks;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -6,6 +6,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -5,6 +5,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -3,6 +3,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -19,7 +19,7 @@
<PackageId>AMWD.Net.Api.Divera</PackageId>
<PackageIcon>package-icon.png</PackageIcon>
<PackageProjectUrl>https://am-wd.de/</PackageProjectUrl>
<PackageProjectUrl>https://www.divera247.com/</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://gitlab.com/blackpanther/divera-24-7-api.git</RepositoryUrl>
......
......@@ -4,6 +4,7 @@ using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.Divera.Exceptions;
using AMWD.Net.Api.Divera.Models;
using AMWD.Net.Api.Divera.Requests;
using AMWD.Net.Api.Divera.Utils;
......@@ -287,7 +288,7 @@ namespace AMWD.Net.Api.Divera
var response = await httpClient.GetAsync($"{DiveraApiUrls.GetUsers}?accesskey={AccessKey}", cancellationToken);
string body = await response.Content.ReadAsStringAsync();
var content = JsonConvert.DeserializeObject<Success<List<User>>>(body);
if (!response.IsSuccessStatusCode)
{
if (response.StatusCode == HttpStatusCode.Forbidden)
......@@ -382,7 +383,7 @@ namespace AMWD.Net.Api.Divera
throw new ObjectDisposedException(GetType().FullName);
if (string.IsNullOrWhiteSpace(AccessKey))
throw new AccessKeyException("The access key is missing");
throw new AccessKeyException("The access key is required");
}
#endregion IDisposable implementation
......
using System;
using System.Runtime.Serialization;
namespace AMWD.Net.Api.Divera
namespace AMWD.Net.Api.Divera.Exceptions
{
/// <summary>
/// Represents an error with the access key.
......
using System;
using System.Runtime.Serialization;
namespace AMWD.Net.Api.Divera
namespace AMWD.Net.Api.Divera.Exceptions
{
/// <summary>
/// Represents an error with the access key.
......
......@@ -5,7 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.am-wd.de/andreasmueller/divera-24-7-api/compare/v1.0.0...main) - 0000-00-00
_nothing here yet_
### Changed
- Moved exceptions to sub-namespace "Exceptions"
## [1.0.0](https://git.am-wd.de/andreasmueller/divera-24-7-api/compare/v0.2.0...v1.0.0) - 2022-01-14
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment