MCPcopy Create free account
hub / github.com/buggregator/server / smtpError

Function smtpError

modules/smtp/api.go:475–479  ·  view source on GitHub ↗
(w http.ResponseWriter, msg string, code int)

Source from the content-addressed store, hash-verified

473}
474
475func smtpError(w http.ResponseWriter, msg string, code int) {
476 w.Header().Set("Content-Type", "application/json")
477 w.WriteHeader(code)
478 json.NewEncoder(w).Encode(map[string]any{"message": msg, "code": code}) //nolint:errcheck
479}

Callers 7

handleMessagesFunction · 0.85
handleMessagesWaitFunction · 0.85
handleDeleteMessagesFunction · 0.85
handleStatsFunction · 0.85
handleRawFunction · 0.85
handleLinksFunction · 0.85
handleCodesFunction · 0.85

Calls 1

WriteHeaderMethod · 0.80

Tested by

no test coverage detected