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