(w http.ResponseWriter, err error)
| 285 | } |
| 286 | |
| 287 | func writeInboundError(w http.ResponseWriter, err error) { |
| 288 | status := http.StatusInternalServerError |
| 289 | if errors.Is(err, inbounds.ErrInboundNotFound) { |
| 290 | status = http.StatusNotFound |
| 291 | } |
| 292 | writeJSON(w, status, map[string]any{"error": err.Error()}) |
| 293 | } |
| 294 | |
| 295 | func writeHostError(w http.ResponseWriter, err error) { |
| 296 | status := http.StatusInternalServerError |
no test coverage detected