{"record":{"id":"dc920b135ee28837","repo":"linera-io/linera-protocol","slug":"daily-claims-are-not-enabled-on-this-faucet","errorCode":null,"errorMessage":"Daily claims are not enabled on this faucet","messagePattern":"Daily claims are not enabled on this faucet","errorType":"validation","errorClass":"async_graphql::Error","httpStatus":null,"severity":"warning","filePath":"linera-faucet/server/src/lib.rs","lineNumber":563,"sourceCode":"        }\n    }\n\n    async fn do_daily_claim(\n        &self,\n        owner: AccountOwner,\n        destination: AccountOwner,\n    ) -> Result<ClaimOutcome, Error> {\n        // Each early return below is a *refusal*, not a failure, and must be counted\n        // under its own `result` label: these paths return before the queue round-trip\n        // that increments `CLAIM_REQUESTS_TOTAL`, so without the explicit counters\n        // refusals are invisible in metrics (they only appear as unlabelled\n        // `claim_latency_ms{result=\"error\"}` observations).\n        if self.daily_claim_amount == Amount::ZERO {\n            #[cfg(with_metrics)]\n            metrics::CLAIM_REQUESTS_TOTAL\n                .with_label_values(&[\"daily_disabled\"])\n                .inc();\n            return Err(Error::new(DAILY_DISABLED_MSG));\n        }\n\n        // The user must have done the initial claim first.\n        let Some(initial_claim) = self.faucet_storage.initial_claim(&owner).await? else {\n            #[cfg(with_metrics)]\n            metrics::CLAIM_REQUESTS_TOTAL\n                .with_label_values(&[\"daily_no_chain\"])\n                .inc();\n            return Err(Error::new(DAILY_NO_CHAIN_MSG));\n        };\n\n        let now = self.storage.clock().current_time();\n        let period = current_daily_period(initial_claim.timestamp.micros(), now.micros());\n        let last_period = self\n            .faucet_storage\n            .last_daily_claim_period(&owner)\n            .await?\n            .unwrap_or(0);","sourceCodeStart":545,"sourceCodeEnd":581,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-faucet/server/src/lib.rs#L545-L581","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Restart the faucet with a non-zero daily amount, e.g. `linera faucet --amount 10 --daily-claim-amount 1 ...`","If daily top-ups are not intended, stop calling `dailyClaim` and rely on the initial `claim` only","After changing the faucet config, send one probe `dailyClaim` before pointing clients at it"],"exampleFix":"# before - daily claims disabled (--daily-claim-amount defaults to 0)\nlinera faucet --amount 10 --port 8080\n\n# after - enable daily claims\nlinera faucet --amount 10 --daily-claim-amount 1 --port 8080","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_daily_disabled(msg: &str) -> bool { msg == \"Daily claims are not enabled on this faucet\" }","tryCatchPattern":"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`.","preventionTips":["Check the faucet's start command or service unit for `--daily-claim-amount > 0` before building daily-claim flows against it","Remember `--daily-claim-amount` defaults to 0 (disabled) — always pass it explicitly when daily claims are wanted","After redeploying a faucet, send one probe `dailyClaim` before pointing clients at it"],"tags":["config","faucet","daily-claim","feature-disabled","linera"],"backgroundTag":"feature-not-enabled","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}