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)
49return new ExecuteCommandResult { Success = false, ErrorMessage = $"Resource '{resourceId}' not found." }; 115ErrorMessage = errorMessage 163return new ExecuteCommandResult { Success = false, ErrorMessage = "Unhandled exception thrown." }; 168return new ExecuteCommandResult { Success = false, ErrorMessage = $"Command '{commandName}' not available for resource '{resourceId}'." };
ResourceBuilderExtensions.cs (1)
2266return new ExecuteCommandResult { Success = false, ErrorMessage = "Endpoints are not yet allocated." };
Aspire.Hosting.Tests (1)
ResourceCommandServiceTests.cs (1)
167return Task.FromResult(new ExecuteCommandResult { Success = false, ErrorMessage = "Failure!" });
15 references to ErrorMessage
Aspire.Hosting (5)
ApplicationModel\ResourceCommandService.cs (2)
110errorMessage += Environment.NewLine + string.Join(Environment.NewLine, failures.Select(f => $"Resource '{f.resourceId}' failed with error message: {f.result.ErrorMessage}")); 151logger.LogInformation("Failure executing command '{CommandName}'. Error message: {ErrorMessage}", commandName, result.ErrorMessage);
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
225ErrorMessage = result.ErrorMessage
Dashboard\DashboardServiceData.cs (2)
104return (ExecuteCommandResultType.Canceled, result.ErrorMessage); 106return (result.Success ? ExecuteCommandResultType.Success : ExecuteCommandResultType.Failure, result.ErrorMessage);
Aspire.Hosting.Tests (10)
ResourceCommandServiceTests.cs (9)
28Assert.Equal("Resource 'NotFoundResourceId' not found.", result.ErrorMessage); 51Assert.Equal("Resource 'myResource' not found.", result.ErrorMessage); 70Assert.Equal("Command 'NotFound' not available for resource 'myResource'.", result.ErrorMessage); 188""", result.ErrorMessage); 214Assert.Null(result.ErrorMessage); 244Assert.Null(result.ErrorMessage); 287""", result.ErrorMessage); 299Assert.Null(result.ErrorMessage); 325Assert.Null(result.ErrorMessage);
WithHttpCommandTests.cs (1)
400Assert.Equal("A test error message", result.ErrorMessage);