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)
49
return new ExecuteCommandResult { Success = false,
ErrorMessage
= $"Resource '{resourceId}' not found." };
102
ErrorMessage
= errorMessage
140
return new ExecuteCommandResult { Success = false,
ErrorMessage
= "Unhandled exception thrown." };
145
return new ExecuteCommandResult { Success = false,
ErrorMessage
= $"Command '{commandName}' not available for resource '{resourceId}'." };
ResourceBuilderExtensions.cs (1)
1812
return new ExecuteCommandResult { Success = false,
ErrorMessage
= "Endpoints are not yet allocated." };
Aspire.Hosting.Tests (1)
ResourceCommandServiceTests.cs (1)
170
return Task.FromResult(new ExecuteCommandResult { Success = false,
ErrorMessage
= "Failure!" });
8 references to ErrorMessage
Aspire.Hosting (3)
ApplicationModel\ResourceCommandService.cs (2)
97
errorMessage += Environment.NewLine + string.Join(Environment.NewLine, failures.Select(f => $"Resource '{f.resourceId}' failed with error message: {f.result.
ErrorMessage
}"));
133
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 (5)
ResourceCommandServiceTests.cs (4)
29
Assert.Equal("Resource 'NotFoundResourceId' not found.", result.
ErrorMessage
);
52
Assert.Equal("Resource 'myResource' not found.", result.
ErrorMessage
);
71
Assert.Equal("Command 'NotFound' not available for resource 'myResource'.", result.
ErrorMessage
);
188
""", result.
ErrorMessage
);
WithHttpCommandTests.cs (1)
362
Assert.Equal("A test error message", result.
ErrorMessage
);