Merge branch 'ClientFactory' into TechMessageRework
This commit is contained in:
commit
a28c5ac2c4
@ -25,9 +25,11 @@ public static class ExceptionsHelper
|
||||
|
||||
public static Exception GetPersistenceException(this IApiResponse response)
|
||||
{
|
||||
var exception = ExceptionsDictionary
|
||||
.FirstOrDefault(e => e.Key == response.StatusCode).Value ?? new Exception("Неопознанная ошибка");
|
||||
ExceptionsDictionary
|
||||
.TryGetValue(response.StatusCode, out var exception);
|
||||
|
||||
return exception;
|
||||
var result = exception ?? new Exception("Неопознанная ошибка");
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user