Skip to content
← Insights

When to Block an Action in an Application: Criteria for Making the Decision

Decide whether to prevent an operation or warn before it proceeds by weighing potential harm, reversibility, and the cost of fixing the outcome later.

An application flow comparing blocking an operation, displaying a warning, and requesting approval.

An application may detect that someone is trying to confirm an order with no stock, approve their own request, or change information that affects other processes. The design decision is not just how to display a message: it is whether the operation should be stopped, whether confirmation is enough, or whether it can go ahead and be corrected later.

The answer depends on the consequences, how much can be recovered, and who has the authority to accept the risk. A poorly chosen block can protect system integrity but also interrupt legitimate work. A poorly chosen warning can let a harmful operation through and shift the cost to customers, teams, or operations. This guide offers practical criteria for choosing between the two.

Blocking is not the same as warning

Blocking is not the same as warning

Blocking means the application does not carry out the requested operation until a condition is met. It might prevent someone from saving, approving, publishing, or sending. The message should explain which condition is missing and, where possible, how to resolve it. For example: “This order can’t be approved because it exceeds the authorized limit. Request additional approval.”

A warning describes a risk but lets the person decide whether to continue. It is appropriate when there is a valid reason to proceed and the person taking action can assess the context. For example, before deleting a draft with unsaved changes, a confirmation lets someone cancel or accept an understandable consequence.

Do not confuse a warning with a security control. If a rule is mandatory—for example, preventing someone without permission from changing restricted data—the interface must not let them bypass it with a “continue” button. Authorization must also be enforced on the server and in APIs, not just in the form. A visual notice can guide people; it does not replace the rule that protects the operation.

Assess impact, reversibility, and the cost of recovery

Before making a decision, describe what could go wrong, who would be affected, and what happens after confirmation. It is not enough to label an error “serious” or “minor”: consider its specific effects and the team’s actual ability to respond.

  • Impact: Consider financial harm, data exposure, policy violations, operational disruption, and loss of trust. Distinguish harm to the person taking action from harm to others.
  • Reversibility: Ask whether the action can be reliably undone, whether reversal restores the previous state, and whether it depends on another person or system. Correcting a label is usually simple; reversing a processed transfer may not be.
  • Detection: Estimate whether the problem will be detected before it causes effects. An operation that automatically triggers other processes may be difficult to intercept afterward.
  • Cost of recovery: Include support time, reconciliation, communication, data loss, and manual work. A technically possible correction may still be slow or incomplete.
  • Frequency and context: Review how often the condition occurs and whether there are legitimate reasons to continue. An exceptional case may justify a review; a common condition may reveal a poorly designed rule.

A practical approach is to sort situations into three groups. If potential harm is high and cannot be reliably repaired, put a barrier in place before confirmation. If the risk is limited and reversible, a warning or undo action may be enough. If the case depends on context the application does not know, it may be better to request approval or refer it to an authorized person.

When to block before confirmation

Prevent the action when proceeding would violate a mandatory rule or create an inconsistency the system cannot accept. Examples include insufficient authorization, a reference to a nonexistent record, or a prohibited state transition. The interface should explain the condition, but decisive validation must run at the point that controls the operation, including services that receive direct requests.

A block is also often justified when the outcome is difficult to reverse and the risk is known before execution. Consider confirming an order with an incomplete address when changing it after dispatch would require manual intervention. If the application has reliable information to detect the problem, requiring the address to be completed before confirmation can prevent a costly consequence.

A block is only useful if it helps. Say which information or permission is missing, who can resolve it, and what alternatives are available. Avoid generic messages such as “Invalid operation” when the user needs to know whether to correct a field, wait for an update, or contact a manager. If the reason cannot be shown for security reasons, explain the next step without revealing protected information.

Also check that the data is up to date. A rule that is satisfied when someone opens a form may no longer be satisfied before they save it because another person has changed the record. To avoid accepting an outdated state, the system must check the relevant conditions at the moment of confirmation and explain the conflict if needed. Do not present an earlier check as a guarantee that the operation is still valid.

When to let people continue with a warning

A warning is appropriate when the risk is understandable, the person has legitimate discretion, and the consequence can be accepted or corrected. For example, a management system might warn that a selected date falls outside the usual period without blocking it if valid operational exceptions exist.

The warning should describe the consequence, not just ask, “Are you sure?” Offer clear options, such as going back to review or continuing with a clearly identified action. For a destructive operation, state which item will be affected and, when relevant, whether there is a way to restore its previous state. Do not promise recovery that the product cannot guarantee.

A warning is no longer sufficient when the user cannot assess the risk, lacks authority to accept it, or the consequence affects third parties who have not consented. Repeating confirmations at every step is not useful either: frequent alerts become noise and encourage people to accept them without reading. Reserve interruptions for meaningful decisions and provide enough context.

Offer alternatives to yes or no

Between blocking completely and allowing an operation to happen immediately, there are options that preserve control and help people complete their work:

  • Save as a draft: Keep the information without triggering the final effect, such as sending, publishing, or approving.
  • Request approval: Route the operation to someone with the authority to decide when the case needs additional judgment. Say who needs to act and show the request’s status.
  • Complete with limits: Allow a partial operation or one with a narrower scope, provided the limits are explicit and do not conceal a mandatory rule.
  • Correct before continuing: Link directly to the field or step that needs attention and preserve completed work when it is safe to do so.
  • Undo or review: If the effect is reversible, provide a visible way to correct it and explain how long it is available or what conditions apply.

These alternatives help prevent dead ends. But they must not become shortcuts around permission, compliance, or integrity controls. An exception needs a specific purpose, a limited scope, and an authorized person or role. If the system cannot reliably enforce that distinction, do not present an exception as a solution.

Define exceptions and test the design

Define exceptions and test the design

Document which rule triggers a block, which roles can resolve it, and what evidence the approval flow requires. Avoid open-ended exceptions such as “continue anyway” if it is unclear who is taking responsibility. For important operations, record the outcome and the actor in line with applicable policies, without storing unnecessary data.

Test both the usual path and edge cases: expired permissions, data changing during an operation, repeated submissions, connection errors, and users going back. Check that a direct request cannot bypass a control applied in the interface, and that a save failure does not leave the user unsure whether the operation completed. The response should distinguish between “rejected” and “outcome unknown,” especially if retrying could duplicate an effect.

After launch, monitor signals that can help you revisit the decision: how often blocks occur, repeated attempts, exception requests, drop-off at that step, and later corrections. Interpret them in context. Many failed attempts may indicate abuse, but they may also point to confusing instructions, an outdated rule, or a process that pushes people toward external workarounds. High drop-off near a warning may signal missing information or an unexpected consequence.

The final decision can be summarized as follows: block what is mandatory and difficult to repair; warn about risks an authorized person can assess; provide a resolution path when the case requires context. Revisit that choice when the impact, reversibility, or recovery process changes. This helps the application protect important operations without turning every exception into an obstacle.

Fuentes y referencias

  1. Web standardsW3C
  2. OWASP Cheat Sheet SeriesOWASP Foundation
  3. Web performanceweb.dev