From 22e8d607adcbd75abef6856c01214aa83c0f4bf2 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Mon, 22 Aug 2022 03:21:12 -0700 Subject: [PATCH] api: Fix InteractionServer's writeError --- api/webhook/interactionserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/webhook/interactionserver.go b/api/webhook/interactionserver.go index 02741b8..08bc898 100644 --- a/api/webhook/interactionserver.go +++ b/api/webhook/interactionserver.go @@ -31,6 +31,8 @@ func writeError(w http.ResponseWriter, code int, err error) { log.Panicln("cannot marshal error response:", err) } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(code) w.Write(b) }