Skip to content

Commit d209331

Browse files
committed
[Blazor][Fixes #15155] Clarifies the message to turn on detailed errors in blazor apps
1 parent 5440cd3 commit d209331

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Components/Server/src/Circuits/CircuitHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ private string GetClientErrorMessage(Exception exception, string additionalInfor
545545
else
546546
{
547547
return $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " +
548-
$"detailed exceptions in '{typeof(CircuitOptions).Name}.{nameof(CircuitOptions.DetailedErrors)}'. {additionalInformation}";
548+
$"detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set '{typeof(CircuitOptions).Name}.{nameof(CircuitOptions.DetailedErrors)}'. {additionalInformation}";
549549
}
550550
}
551551

src/Components/test/E2ETest/ServerExecutionTests/ComponentHubInvalidEventTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task DispatchingAnInvalidEventArgument_DoesNotProduceWarnings()
3838
{
3939
// Arrange
4040
var expectedError = $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " +
41-
$"detailed exceptions in 'CircuitOptions.DetailedErrors'. Bad input data.";
41+
$"detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'. Bad input data.";
4242

4343
var eventDescriptor = Serialize(new WebEventDescriptor()
4444
{
@@ -65,7 +65,7 @@ public async Task DispatchingAnInvalidEvent_DoesNotTriggerWarnings()
6565
{
6666
// Arrange
6767
var expectedError = $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " +
68-
$"detailed exceptions in 'CircuitOptions.DetailedErrors'. Failed to dispatch event.";
68+
$"detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'. Failed to dispatch event.";
6969

7070
var eventDescriptor = Serialize(new WebEventDescriptor()
7171
{
@@ -105,7 +105,7 @@ public async Task DispatchingAnInvalidRenderAcknowledgement_DoesNotTriggerWarnin
105105
{
106106
// Arrange
107107
var expectedError = $"There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on " +
108-
$"detailed exceptions in 'CircuitOptions.DetailedErrors'. Failed to complete render batch '1846'.";
108+
$"detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'. Failed to complete render batch '1846'.";
109109

110110

111111
Client.ConfirmRenderBatch = false;

src/Components/test/E2ETest/ServerExecutionTests/ComponentHubReliabilityTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public async Task OnLocationChanged_ReportsDebugForExceptionInValidation()
216216
{
217217
// Arrange
218218
var expectedError = "There was an unhandled exception on the current circuit, so this circuit will be terminated. " +
219-
"For more details turn on detailed exceptions in 'CircuitOptions.DetailedErrors'. " +
219+
"For more details turn on detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'. " +
220220
"Location change to 'http://example.com' failed.";
221221

222222
var rootUri = ServerFixture.RootUri;
@@ -245,7 +245,7 @@ public async Task OnLocationChanged_ReportsErrorForExceptionInUserCode()
245245
{
246246
// Arrange
247247
var expectedError = "There was an unhandled exception on the current circuit, so this circuit will be terminated. " +
248-
"For more details turn on detailed exceptions in 'CircuitOptions.DetailedErrors'. " +
248+
"For more details turn on detailed exceptions by setting 'detailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'. " +
249249
"Location change failed.";
250250

251251
var rootUri = ServerFixture.RootUri;

0 commit comments

Comments
 (0)