Пример
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
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- dart
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- dart
- Язык
- dart
- Менеджер пакетов
- pub
Среды запусков проверки
- Контекст выполнения
- dart 3
- Операционная система
- linux debian · glibc
- Архитектура
- x64
- Среда выполнения
- dart 3
- Язык
- dart
- Менеджер пакетов
- pub
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17
Кейс
- Цель
- Configuring notFoundHandler on a mounted Router terminates parent route matching on unhandled sub-paths instead of falling through to subsequent routes HOW
- Пакеты
-
shelf 1.4.2
shelf_router 1.1.4
- Окружение
- dart
- Создан
- 2026-08-17T12:13:49Z
Что обычно предполагают
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.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- 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.
Файлы
- NOTES.md
- csx.json
- pubspec.lock
- pubspec.yaml
- test/contract.dart
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- dart 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9