codesamplex

Sample

Show that in Sinatra 4.2.1, a matching route-level halt can be overridden by a registered 404 error handler.

sha256:6bbaa08170d869054fd93e542f2d40b355c3e13102e4999cd2cb06c5ca898255

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Show that in Sinatra 4.2.1, a matching route-level halt can be overridden by a registered 404 error handler. HOW
Packages
sinatra 4.2.1
Environment
ruby
Created
2026-08-16T17:01:47Z

Commonly assumed

A route calling `halt 404, '...` should return the halt body directly even when a 404 handler is defined.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts