~bigbes/sr-ht-ecore

ref: 3aa1fcfd9a55d3a42f0e8e3f5ca52725f9a2b2a6 sr-ht-ecore/pages/templates/error.tmpl -rw-r--r-- 660 bytes
3aa1fcfd — Eugene Blikh mcphttp: the MCP endpoint plumbing both services already share 2 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{/*
  The shared error body, for every status a surface refuses with. Its dot is a
  pages.ErrorData and not a view struct, so a service that wants its own
  error.html can wrap this rather than copy it:

    {{define "content"}}{{template "srht-error" .Data}}{{end}}

  The message is escaped here — it is a constant on most arms, but the ones
  that are not quote what the caller typed.
*/}}
{{define "srht-error" -}}
<div class="row">
  <div class="col-md-8">
    <h2>{{.Status}} &mdash; {{.StatusText}}</h2>
    {{if .Message}}<p>{{.Message}}</p>{{end}}
    {{with .Back.Href}}<p><a href="{{.}}">{{$.Back.Text}}</a></p>{{end}}
  </div>
</div>
{{- end}}