* Remove bookmark-based resumption logic for lost HTTP context scenarios in `WriteHttpResponse` and `WriteFileHttpResponse`. Simplify error handling by throwing descriptive exceptions for workflows resuming without an available HTTP context. * Add integration tests for HTTP context loss scenarios in `WriteHttpResponse` and `WriteFileHttpResponse`. * Add integration tests for handling HTTP context loss in response activities. * Replace bookmark-based logic with fault exceptions in tests for `WriteHttpResponse` and `WriteFileHttpResponse` when HTTP context is unavailable. * Update agent-logs/http-context-loss-error-messaging.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/integration/Elsa.Http.IntegrationTests/Elsa.Http.IntegrationTests.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
14 lines
353 B
C#
14 lines
353 B
C#
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace Elsa.Http.IntegrationTests.Helpers;
|
|
|
|
/// <summary>
|
|
/// A null HTTP context accessor that always returns null.
|
|
/// Used for testing scenarios where HTTP context is lost.
|
|
/// </summary>
|
|
internal class NullHttpContextAccessor : IHttpContextAccessor
|
|
{
|
|
public HttpContext? HttpContext { get; set; } = null;
|
|
}
|
|
|