Skip to content

Commit 79593a2

Browse files
author
Kevin Hellemun
committed
Message! 🔥.
1 parent 58db502 commit 79593a2

9 files changed

+17
-12
lines changed

BunqSdk/Exception/ApiException.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@ namespace Bunq.Sdk.Exception
33
{
44
public class ApiException : System.Exception
55
{
6+
private readonly string message;
67
public int ResponseCode { get; private set; }
7-
public string Messages { get; private set; }
8+
9+
public override string Message
10+
{
11+
get { return message; }
12+
}
813

914
/// <param name="responseCode">The HTTP Response code of the failed request.</param>
10-
/// <param name="messages">The list of messages related to this exception.</param>
11-
public ApiException(int responseCode, string messages) : base(messages)
15+
/// <param name="message">The list of messages related to this exception.</param>
16+
public ApiException(int responseCode, string message) : base(message)
1217
{
1318
ResponseCode = responseCode;
14-
Messages = messages;
19+
this.message = message;
1520
}
1621
}
1722
}

BunqSdk/Exception/BadRequestException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class BadRequestException : ApiException
44
{
5-
public BadRequestException(int responseCode, string messages) : base(responseCode, messages)
5+
public BadRequestException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/ForbiddenException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class ForbiddenException : ApiException
44
{
5-
public ForbiddenException(int responseCode, string messages) : base(responseCode, messages)
5+
public ForbiddenException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/MethodNotAllowedException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class MethodNotAllowedException : ApiException
44
{
5-
public MethodNotAllowedException(int responseCode, string messages) : base(responseCode, messages)
5+
public MethodNotAllowedException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/NotFoundException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class NotFoundException : ApiException
44
{
5-
public NotFoundException(int responseCode, string messages) : base(responseCode, messages)
5+
public NotFoundException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/PleaseContactBunqException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class PleaseContactBunqException : ApiException
44
{
5-
public PleaseContactBunqException(int responseCode, string messages) : base(responseCode, messages)
5+
public PleaseContactBunqException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/TooManyRequestsException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class TooManyRequestsException : ApiException
44
{
5-
public TooManyRequestsException(int responseCode, string messages) : base(responseCode, messages)
5+
public TooManyRequestsException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/UnauthorizedException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class UnauthorizedException : ApiException
44
{
5-
public UnauthorizedException(int responseCode, string messages) : base(responseCode, messages)
5+
public UnauthorizedException(int responseCode, string message) : base(responseCode, message)
66
{
77
}
88
}

BunqSdk/Exception/UnknownApiErrorException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/// </summary>
66
public class UnknownApiErrorException : ApiException
77
{
8-
public UnknownApiErrorException(int responseCode, string messages) : base(responseCode, messages)
8+
public UnknownApiErrorException(int responseCode, string message) : base(responseCode, message)
99
{
1010
}
1111
}

0 commit comments

Comments
 (0)