error-page
Route The pieces that are a whole response rather than a piece of one.
The whole body of an error response: the status, one honest sentence, a way back, and 500 references an admin can use.
Each example is live, but its links go nowhere. HTML shows the markup to copy.
404: not found
<div rst-error rst-stack >
<p rst-error-status >404</p >
<h1 rst-error-title >We can't find that page</h1 >
<p rst-error-body >The link may be out of date, or the page may have moved. Check the address, or go back to the start.</p >
<p rst-error-cta rst-actions >
<a rst-btn ="primary" href ="/" >Start page</a >
</p >
</div >
In an app this would reach /. Here its links and forms go nowhere.
403: forbidden
<div rst-error rst-stack >
<p rst-error-status >403</p >
<h1 rst-error-title >You can't see this</h1 >
<p rst-error-body >Your account doesn't have access here. If you think it should, ask whoever runs this site.</p >
<p rst-error-cta rst-actions >
<a rst-btn ="primary" href ="/" >Start page</a >
<a rst-btn href ="/posts" >Go back</a >
</p >
</div >
In an app this would reach /, /posts. Here its links and forms go nowhere.
422: unprocessable
<div rst-error rst-stack >
<p rst-error-status >422</p >
<h1 rst-error-title >That didn't go through</h1 >
<p rst-error-body >Something in what was sent wasn't right. Go back and try again; nothing was saved.</p >
<p rst-error-cta rst-actions >
<a rst-btn ="primary" href ="/" >Start page</a >
<a rst-btn href ="/posts/1/edit" >Go back</a >
</p >
</div >
In an app this would reach /, /posts/1/edit. Here its links and forms go nowhere.
500: server error
A 500 is the one status with a reference: an operator can grep the logs for it.
<div rst-error rst-stack >
<p rst-error-status >500</p >
<h1 rst-error-title >Something went wrong on our side</h1 >
<p rst-error-body >It's not you. The problem has been recorded. Try again in a moment; if it keeps happening, quote the reference below.</p >
<p rst-error-cta rst-actions >
<a rst-btn ="primary" href ="/" >Start page</a >
</p >
<p class ="rst-mono" rst-error-ref dir ="auto" >Reference: k3f9tq</p >
</div >
In an app this would reach /. Here its links and forms go nowhere.
Anything else: the generic pair
Any status that has no wording of its own gets this generic pair: a title that says something is wrong and a body that says to try again.
<div rst-error rst-stack >
<p rst-error-status >418</p >
<h1 rst-error-title >Something's not right</h1 >
<p rst-error-body >That request couldn't be completed. Go back and try again.</p >
<p rst-error-cta rst-actions >
<a rst-btn ="primary" href ="/" >Start page</a >
</p >
</div >
In an app this would reach /. Here its links and forms go nowhere.