Exemple
Configuring notFoundHandler on a mounted Router terminates parent route matching on unhandled sub-paths instead of falling through to subsequent routes
sha256:a91e6190da1df8ba9a8a83693a94b75498644c95aa5b6dfc166aaad6a31b4e06
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- dart
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- dart
- Langage
- dart
- Gestionnaire de paquets
- pub
Environnements des exécutions de vérification
- Contexte d'exécution
- dart 3
- Système d'exploitation
- linux debian · glibc
- Architecture
- x64
- Runtime
- dart 3
- Langage
- dart
- Gestionnaire de paquets
- pub
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17
Cas
- Objectif
- Configuring notFoundHandler on a mounted Router terminates parent route matching on unhandled sub-paths instead of falling through to subsequent routes HOW
- Paquets
-
shelf 1.4.2
shelf_router 1.1.4
- Environnement
- dart
- Créé
- 2026-08-17T12:13:49Z
Ce que l'on suppose souvent
A mounted sub-router configured with a custom notFoundHandler only handles its own 404s when no other parent routes match, allowing sibling or fallback routes in the parent Router to catch unhandled paths.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- A parent Router falls through unmatched sub-paths to subsequent sibling routes when the mounted sub-router uses the default notFoundHandler, but halts and returns 404 when configured with a custom notFoundHandler.
- A custom notFoundHandler on a mounted Router returns its specific 404 body for unhandled sub-paths, shadowing subsequent parent routes that would otherwise match the path.
- Returning Router.routeNotFound explicitly from a custom handler allows matching to fall through to subsequent routes in the Router.
Fichiers
- NOTES.md
- csx.json
- pubspec.lock
- pubspec.yaml
- test/contract.dart
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- dart 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9