7 writes to ErrorMessage
Aspire.Hosting (6)
ApplicationModel\ResourceCommandAnnotation.cs (1)
131public static ExecuteCommandResult Failure(string? errorMessage = null) => new() { Success = false, ErrorMessage = errorMessage };
ApplicationModel\ResourceCommandService.cs (4)
36return new ExecuteCommandResult { Success = false, ErrorMessage = $"Resource '{resourceId}' not found." }; 89ErrorMessage = errorMessage 127return new ExecuteCommandResult { Success = false, ErrorMessage = "Unhandled exception thrown." }; 132return new ExecuteCommandResult { Success = false, ErrorMessage = $"Command '{commandName}' not available for resource '{resourceId}'." };
ResourceBuilderExtensions.cs (1)
1809return new ExecuteCommandResult { Success = false, ErrorMessage = "Endpoints are not yet allocated." };
Aspire.Hosting.Tests (1)
ResourceCommandServiceTests.cs (1)
111return Task.FromResult(new ExecuteCommandResult { Success = false, ErrorMessage = "Failure!" });
7 references to ErrorMessage
Aspire.Hosting (3)
ApplicationModel\ResourceCommandService.cs (2)
84errorMessage += Environment.NewLine + string.Join(Environment.NewLine, failures.Select(f => $"Resource '{f.resourceId}' failed with error message: {f.result.ErrorMessage}")); 120logger.LogInformation("Failure executing command '{CommandName}'. Error message: {ErrorMessage}", commandName, result.ErrorMessage);
Dashboard\DashboardServiceData.cs (1)
100return (result.Success ? ExecuteCommandResultType.Success : ExecuteCommandResultType.Failure, result.ErrorMessage);
Aspire.Hosting.Tests (4)
ResourceCommandServiceTests.cs (3)
30Assert.Equal("Resource 'NotFoundResourceId' not found.", result.ErrorMessage); 49Assert.Equal("Command 'NotFound' not available for resource 'myResource'.", result.ErrorMessage); 129""", result.ErrorMessage);
WithHttpCommandTests.cs (1)
363Assert.Equal("A test error message", result.ErrorMessage);