Skip to content

Commit

Permalink
update processors page
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-nitehawk committed Mar 2, 2023
1 parent 456aa9c commit 66c5029
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/docs/[...9]pre-post-processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The send methods are accessed from the **ctx.Response** property as shown above.
When a response is sent from a pre-processor, the handler method is not executed.

:::admonition type="note"
If there are multiple pre-processors configured, they will be executed. if another pre-processor also wants to send a response, they must check if it's possible to do so by checking the property **ctx.Response.HasStarted** to see if a previously executed pre-processor has already sent a response to the client.
If there are multiple pre-processors configured, they will be executed. If another pre-processor also wants to send a response, they must check if it's possible to do so by checking the result of **ctx.ResponseStarted()** to see if a previously executed pre-processor has already sent a response to the client. See example [here](#global-processors).
:::

## Post Processors
Expand Down Expand Up @@ -154,7 +154,7 @@ public class TenantIDChecker : IGlobalPreProcessor
else
{
failures.Add(new("TenandID", "Unable to retrieve tenant id from header!"));
if (!ctx.Response.HasStarted)
if (!ctx.ResponseStarted())
await ctx.Response.SendErrorsAsync(failures);
}
}
Expand Down

0 comments on commit 66c5029

Please sign in to comment.