#650 Актуализировать работу с технологическими сообщениями под Event Service #10

Closed
rs.efremov wants to merge 3 commits from TechMessageRework into master
Showing only changes of commit a28c5ac2c4 - Show all commits

View File

@ -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;
}
}