Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: Microsoft.Azure.Workflows.UnitTesting.ErrorResponses
This class provides more contextual information for the error responses in workflow testing scenarios. The information schema is service-specific and dependent on the Type string.
Usage
// The request ID for the additional info
var requestIdInfo = new TestErrorResponseAdditionalInfo
{
Type = "RequestId",
Info = JToken.FromObject("req-abc123")
};
// The timestamp for the additional info
var timestampInfo = new TestErrorResponseAdditionalInfo
{
Type = "Timestamp",
Info = JToken.FromObject(DateTime.UtcNow)
};
// Complex additional info with nested data
var complexInfo = new TestErrorResponseAdditionalInfo
{
Type = "ValidationDetails",
Info = JToken.Parse(@"{
""field"": ""email"",
""providedValue"": ""invalid-email"",
""expectedFormat"": ""user@domain.com""
}")
};
// Use in error context
var error = new TestErrorInfo(
ErrorResponseCode.BadRequest,
"Validation failed",
null,
new[] { requestIdInfo, timestampInfo }
);
Properties
Name | Description | Type | Required |
---|---|---|---|
Type | The type for the additional error info | string | No |
Info | The additional information | JToken | No |
Related content
- ActionMock Class Definition
- TriggerMock Class Definition
- TestActionExecutionContext Class Definition
- TestExecutionContext Class Definition
- TestIterationItem Class Definition
- TestWorkflowRun Class Definition
- TestErrorInfo Class Definition
- TestWorkflowOutputParameter Class Definition
- TestWorkflowRunActionRepetitionResult Class Definition
- TestWorkflowRunActionResult Class Definition
- TestWorkflowRunTriggerResult Class Definition
- TestWorkflowStatus Enum Definition
- UnitTestExecutor Class Definition