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

Function InternalServerError

coderd/httpapi/httpapi.go:166–176  ·  view source on GitHub ↗
(rw http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

164}
165
166func InternalServerError(rw http.ResponseWriter, err error) {
167 var details string
168 if err != nil {
169 details = err.Error()
170 }
171
172 Write(context.Background(), rw, http.StatusInternalServerError, codersdk.Response{
173 Message: "An internal server error occurred.",
174 Detail: details,
175 })
176}
177
178func RouteNotFound(rw http.ResponseWriter) {
179 Write(context.Background(), rw, http.StatusNotFound, codersdk.Response{

Callers 15

RecoverFunction · 0.92
patchTemplateMetaMethod · 0.92
postWorkspaceUsageMethod · 0.92
resolveAutostartMethod · 0.92
workspaceACLMethod · 0.92
patchWorkspaceACLMethod · 0.92
deleteWorkspaceACLMethod · 0.92
allowWorkspaceSharingMethod · 0.92
workspaceAgentReinitMethod · 0.92
regenerateGitSSHKeyMethod · 0.92

Calls 2

WriteFunction · 0.85
ErrorMethod · 0.45

Tested by 3

TestInternalServerErrorFunction · 0.74
Test_TaskStatusFunction · 0.74
TestExpTaskDeleteFunction · 0.74