diff --git a/lxd/operations/response.go b/lxd/operations/response.go
index <HASH>..<HASH> 100644
--- a/lxd/operations/response.go
+++ b/lxd/operations/response.go
@@ -96,9 +96,16 @@ func (r *forwardedOperationResponse) Render(w http.ResponseWriter) error {
 	}
 
 	w.Header().Set("Location", url)
-	w.WriteHeader(202)
 
-	return util.WriteJSON(w, body, debug)
+	code := 202
+	w.WriteHeader(code)
+
+	var debugLogger logger.Logger
+	if debug {
+		debugLogger = logging.AddContext(logger.Log, log.Ctx{"http_code": code})
+	}
+
+	return util.WriteJSON(w, body, debugLogger)
 }
 
 func (r *forwardedOperationResponse) String() string {
lxd/operations/response: Adds util.WriteJSON support to forwardedOperationResponse