Skip to content

errors.md example calls non-existent Lease.Contains #54

@nficano

Description

@nficano

Category: docs Severity: major
Location: docs/guides/errors.md:93-93

What

Lease (src/Arcp.Core/Leases/Lease.cs) exposes only the Capabilities dictionary and a Get(string) method; there is no Contains method (verified by grep). ctx.Lease.Contains(...) does not compile.

Evidence

    if (!ctx.Lease.Contains(LeaseNamespaces.FsRead))
        throw new PermissionDeniedException("fs.read required");

Proposed fix

Use ctx.Lease.Get(LeaseNamespaces.FsRead).Count == 0 or ctx.Lease.Capabilities.ContainsKey(LeaseNamespaces.FsRead).

Acceptance criteria

  • The example uses a member that exists on Lease and compiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    audit/docsAudit: documentation inaccuracysev/majorSeverity: major

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions