Unplanned
Last Updated: 06 Oct 2025 14:21 by Sadik
Sadik
Created on: 06 Oct 2025 14:21
Category: UI for Blazor
Type: Bug Report
0
Exception thrown in "picker" component events is not caught by ErrorBoundary

Description

Affected components: those inheriting from TelerikInputBase (e.g., TelerikDatePicker). When an exception is thrown inside an async Task event handler for the OnChange, OnBlur, OnOpen, and ValueChanged events, the exception is completely and silently swallowed. The exception is not caught by ErrorBoundary.

Related: #6333, #12364

Steps To Reproduce

  1. Use a standard ErrorBoundary in MainLayout.razor.
<ErrorBoundary>
    <ChildContent>
        @Body
    </ChildContent>
    <ErrorContent>
        <p class="error">An unhandled error has occurred.</p>
    </ErrorContent>
</ErrorBoundary>
  1. Declare a TelerikDatePicker and bind an async Task method to the ValueChanged or OnChange event.
<TelerikDatePicker Value="@DatePickerValue"
                   ValueChanged="@((DateTime inputDate) => OnDatePickerValueChanged(inputDate))">
</TelerikDatePicker>


<TelerikButton OnClick="@(() => throw new Exception("Exception from button"))">Click to test ErrorBoundary</TelerikButton>

@code {
    private DateTime DatePickerValue { get; set; } = DateTime.Today;

    private async Task OnDatePickerValueChanged(DateTime newValue)
    {
        throw new InvalidOperationException("This exception should be caught by the ErrorBoundary!");
    }
}
  1. Run the page and select a date in the DatePicker.

Actual Behavior

The exception thrown in the OnDatePickerValueChanged event handler is not caught by ErrorBoundary.

Expected Behavior

The exception thrown in the OnDatePickerValueChanged event handler is caught by ErrorBoundary.

Browser

All

Last working version of Telerik UI for Blazor (if regression)

No response

0 comments