linera-io/linera-protocol · warning · async_graphql::Error

Daily claims are not enabled on this faucet

Error message

Daily claims are not enabled on this faucet

What it means

`dailyClaim` refuses immediately when the faucet was configured with `daily_claim_amount == Amount::ZERO` (DAILY_DISABLED_MSG). `linera faucet` defaults `--daily-claim-amount` to 0, which deliberately disables the daily-claim feature (command.rs:890-892: 'Set to 0 to disable daily claims'); only the initial `claim` is served by such a faucet. This is a policy refusal, not a malfunction.

Source

Thrown at linera-faucet/server/src/lib.rs:563

        }
    }

    async fn do_daily_claim(
        &self,
        owner: AccountOwner,
        destination: AccountOwner,
    ) -> Result<ClaimOutcome, Error> {
        // Each early return below is a *refusal*, not a failure, and must be counted
        // under its own `result` label: these paths return before the queue round-trip
        // that increments `CLAIM_REQUESTS_TOTAL`, so without the explicit counters
        // refusals are invisible in metrics (they only appear as unlabelled
        // `claim_latency_ms{result="error"}` observations).
        if self.daily_claim_amount == Amount::ZERO {
            #[cfg(with_metrics)]
            metrics::CLAIM_REQUESTS_TOTAL
                .with_label_values(&["daily_disabled"])
                .inc();
            return Err(Error::new(DAILY_DISABLED_MSG));
        }

        // The user must have done the initial claim first.
        let Some(initial_claim) = self.faucet_storage.initial_claim(&owner).await? else {
            #[cfg(with_metrics)]
            metrics::CLAIM_REQUESTS_TOTAL
                .with_label_values(&["daily_no_chain"])
                .inc();
            return Err(Error::new(DAILY_NO_CHAIN_MSG));
        };

        let now = self.storage.clock().current_time();
        let period = current_daily_period(initial_claim.timestamp.micros(), now.micros());
        let last_period = self
            .faucet_storage
            .last_daily_claim_period(&owner)
            .await?
            .unwrap_or(0);

View on GitHub (pinned to 6c226ddcb3)

Solutions

  1. Restart the faucet with a non-zero daily amount, e.g. `linera faucet --amount 10 --daily-claim-amount 1 ...`
  2. If daily top-ups are not intended, stop calling `dailyClaim` and rely on the initial `claim` only
  3. After changing the faucet config, send one probe `dailyClaim` before pointing clients at it

Example fix

# before - daily claims disabled (--daily-claim-amount defaults to 0)
linera faucet --amount 10 --port 8080

# after - enable daily claims
linera faucet --amount 10 --daily-claim-amount 1 --port 8080
Defensive patterns

Strategy: try-catch

Type guard

fn is_daily_disabled(msg: &str) -> bool { msg == "Daily claims are not enabled on this faucet" }

Try / catch

Catch the `dailyClaim` error; if the message is exactly `Daily claims are not enabled on this faucet`, disable the daily-claim feature in your client (fall back to initial `claim` only) instead of retrying — the setting only changes when the faucet is restarted with a new `--daily-claim-amount`.

Prevention

When it happens

Trigger: Sending the `dailyClaim(owner:)` mutation to a faucet that was started with `--daily-claim-amount 0` or without the flag at all (the default). The check happens at the front door, before any storage lookup or queue round-trip.

Common situations: Local devnets or hand-started test faucets that only pass `--amount`; an operator forgetting to carry the daily-claim flag over during a redeploy; clients written against a daily-claim-enabled faucet later pointed at one that is not.

Related errors


AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22). Data as JSON: /api/errors/dc920b135ee28837. Report an issue: GitHub.