Skip to content

Commit e88274c

Browse files
author
Kevin Hellemun
committed
Added missing else and moved else if statement to new line. (#63)
1 parent 29daba5 commit e88274c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

BunqSdk/Exception/ExceptionFactory.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23

34
namespace Bunq.Sdk.Exception
45
{
6+
/// <summary>
7+
/// This class makes sure that the correct exception is thrown for the given response code.
8+
/// </summary>
59
public class ExceptionFactory
610
{
711
/// <summary>

BunqSdk/Http/ApiClient.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,15 @@ private static string DetermineResponseIdByAllHeader(HttpHeaders allHeader)
302302
if (allHeader.Contains(HEADER_RESPONSE_ID_UPPER_CASE))
303303
{
304304
return allHeader.GetValues(HEADER_RESPONSE_ID_UPPER_CASE).First();
305-
} else if (allHeader.Contains(HEADER_RESPONSE_ID_LOWER_CASE))
305+
}
306+
else if (allHeader.Contains(HEADER_RESPONSE_ID_LOWER_CASE))
306307
{
307308
return allHeader.GetValues(HEADER_RESPONSE_ID_LOWER_CASE).First();
308309
}
309-
310-
throw new BunqException(ERROR_COULD_NOT_DETERMINE_RESPONSE_ID_HEADER);
310+
else
311+
{
312+
throw new BunqException(ERROR_COULD_NOT_DETERMINE_RESPONSE_ID_HEADER);
313+
}
311314
}
312315

313316
private static ApiException CreateApiExceptionRequestUnsuccessful(

0 commit comments

Comments
 (0)