public async Task<DataSourceResult> GetTripGridGroupedAsync(DataSourceRequest request)
Volo.Abp.Http.Client.AbpRemoteCallException: Internal Server Error
---> System.Text.Json.JsonException: Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. Path: $.data | LineNumber: 8 | BytePositionInLine: 1.
---> System.Text.Json.JsonReaderException: Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. LineNumber: 8 | BytePositionInLine: 1.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Utf8JsonReader.TrySkipPartial(Int32 targetDepth) at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo1 jsonTypeInfo) at Volo.Abp.Json.SystemTextJson.AbpSystemTextJsonSerializer.Deserialize[T](String jsonString, Boolean camelCase) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
--- End of inner exception stack trace ---
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.ThrowExceptionForResponseAsync(HttpResponseMessage response) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy1.CallRequestAsync[T](ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.CallRequestAsync[T](ClientProxyRequestContext context) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.GetResultAsync(Task task, Type resultType)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)
at TmsSolution.Blazor.Client.Pages.Trips.List.Index.OnReadEvents(GridReadEventArgs args) in /Users/thinhnguyen/Documents/Regent/tmssolution/src/TmsSolution.Blazor.Client/Pages/Trips/List/Index.razor.cs:line 222
This is the request { "skip": 0, "page": 1, "pageSize": 20, "sorts": [ { "member": "CreationTime", "sortDirection": 1 } ], "filters": [ { "logicalOperator": 0, "filterDescriptors": [ { "member": "group", "operator": 8, "value": "TripStatusId" } ] } ], "groups": [ { "displayContent": "TripStatusId", "aggregateFunctions": [], "member": "TripStatusId", "sortDirection": 0 } ], "aggregates": [], "groupPaging": false }
This causes a 500 Internal Server Error on the client side and breaks the data flow, specifically in the OnReadEvents method in blazor Page.
Can you please give me way to fix this problem in abp framework
I want to disable or override the default message dialog that appears during unhandled exceptions inside a try-catch block. Instead, I would like to handle the error manually and show notify only or logs.
Currently, when an exception occurs—even though it's wrapped in a try-catch—a system-generated dialog still appears. This is not the desired behavior because:
When an exception is caught in a try-catch, only my custom error-handling logic should be executed. No default or automatic dialogs should be shown.
try
{
// Some operation that might throw
}
catch (Exception ex)
{
Logger.LogError(e, "Error change status container type with id id :{SelectedContainerTypeId}",
SelectedContainerTypeId);
await Notify.Error(string.IsNullOrEmpty(e.Message) ? L["Messages:Error"] : e.Message);
}