File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1- using System . Collections . Generic ;
1+ using System ;
2+ using System . Collections . Generic ;
23
34namespace 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>
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments