scrml.dev v0.7.1
Reference › Errors

I-AUTH-REDIRECT-UNRESOLVED

A gate's redirect target does not match any page URL in the route map.

Info Compile-time SPEC §40.1.1 (normative)

What it means

An auth gate may name a redirect target for visitors who fail the check. This lint fires, per gate, when that path matches no page in the compilation unit — almost always a typo or a page that has not been written yet. It is informational only: the gate stays legal and the redirect still happens at runtime, it just lands on a 404.

Minimal reproducer

This is the exact source compiled against the linked compiler and verified to produce I-AUTH-REDIRECT-UNRESOLVED.

app.scrml

<program title="p" auth="required">
    <outlet/>
</>

pages/index.scrml

<page>
    type Role:enum = { Admin, Member }
    <auth role="Admin" redirect="/nowhere">
        <p>admin</p>
    </>
</>

How to fix

  1. Author the page at that path. Usually the login page the redirect was pointing at.
  2. Correct the redirect target. Match an existing route exactly.

Related

Specification

Normative text: §40.1.1, §34. Spec lives at compiler/SPEC.md .

← Reference