MCPcopy Index your code
hub / github.com/coder/coder / Write

Method Write

coderd/idpsync/idpsync.go:251–272  ·  view source on GitHub ↗
(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

249}
250
251func (e HTTPError) Write(rw http.ResponseWriter, r *http.Request) {
252 if e.RenderStaticPage {
253 site.RenderStaticErrorPage(rw, r, site.ErrorPageData{
254 Status: e.Code,
255 HideStatus: true,
256 Title: e.Msg,
257 Description: e.Detail,
258 Actions: []site.Action{
259 {
260 URL: "/login",
261 Text: "Back to site",
262 },
263 },
264 RenderDescriptionMarkdown: e.RenderDetailMarkdown,
265 })
266 return
267 }
268 httpapi.Write(r.Context(), rw, e.Code, codersdk.Response{
269 Message: e.Msg,
270 Detail: e.Detail,
271 })
272}
273
274func (e HTTPError) Error() string {
275 if e.Detail != "" {

Callers

nothing calls this directly

Calls 3

RenderStaticErrorPageFunction · 0.92
WriteFunction · 0.92
ContextMethod · 0.65

Tested by

no test coverage detected