Skip to content

Commit dc0f73c

Browse files
committed
Cleanup config management
1 parent 9f62d68 commit dc0f73c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Server/Coderr.Server.ReportAnalyzer/Inbound/SaveReportHandler.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System.Text;
99
using System.Threading.Tasks;
1010
using codeRR.Server.App.Core.Reports.Config;
11-
using codeRR.Server.Infrastructure.Configuration;
1211
using codeRR.Server.ReportAnalyzer.Inbound.Models;
1312
using codeRR.Server.ReportAnalyzer.LibContracts;
1413
using Coderr.Server.PluginApi.Config;
@@ -40,8 +39,8 @@ public SaveReportHandler(IMessageQueue queue, IAdoNetUnitOfWork unitOfWork, Conf
4039
{
4140
_unitOfWork = unitOfWork;
4241
_queue = queue ?? throw new ArgumentNullException(nameof(queue));
43-
var config= configStore.Load<ReportConfig>();
44-
_maxSizeForJsonErrorReport = config?.MaxReportJsonSize ?? 1000000;
42+
var config = configStore.Load<ReportConfig>();
43+
_maxSizeForJsonErrorReport = config.MaxReportJsonSize;
4544
}
4645

4746
public void AddFilter(Func<NewReportDTO, bool> filter)
@@ -141,7 +140,7 @@ private NewReportDTO DeserializeBody(byte[] body)
141140
if (json.Length > _maxSizeForJsonErrorReport)
142141
return null;
143142

144-
//to support clients that still use the OneTrueError client library.
143+
// to support clients that still use the OneTrueError client library.
145144
json = json.Replace("OneTrueError", "codeRR");
146145

147146
return JsonConvert.DeserializeObject<NewReportDTO>(json,

0 commit comments

Comments
 (0)