MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / internalError

Function internalError

internal/serverapi/api.go:874–877  ·  view source on GitHub ↗

internalError 记录完整错误到日志,并向客户端返回通用 500 响应,避免内部细节泄露。

(w http.ResponseWriter, r *http.Request, err error)

Source from the content-addressed store, hash-verified

872
873// internalError 记录完整错误到日志,并向客户端返回通用 500 响应,避免内部细节泄露。
874func internalError(w http.ResponseWriter, r *http.Request, err error) {
875 log.Printf("internal error: %s %s: %v", r.Method, r.URL.Path, err)
876 writeJSON(w, http.StatusInternalServerError, map[string]any{"error": "internal server error"})
877}
878
879func parseExpireAt(s *string) *time.Time {
880 if s == nil || *s == "" {

Callers 15

saveTracerouteResultMethod · 0.85
listTracerouteResultsMethod · 0.85
handleRealityKeypairFunction · 0.85
handleUsersMethod · 0.85
handleUpdateUserMethod · 0.85
handleUserInboundsMethod · 0.85
handleUserCredentialsMethod · 0.85
handleAccessApplyMethod · 0.85
handleResetTrafficMethod · 0.85

Calls 1

writeJSONFunction · 0.70

Tested by

no test coverage detected