瀏覽代碼

Document Matrix pushkey error + set log level to warnings for Matrix errors

Christophe Henry 3 年之前
父節點
當前提交
ec64b412a8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/server_matrix.go

+ 1 - 1
server/server_matrix.go

@@ -124,7 +124,7 @@ func newRequestFromMatrixJSON(r *http.Request, baseURL string, messageLimit int)
 	}
 	pushKey := m.Notification.Devices[0].PushKey // We ignore other devices for now, see discussion in #316
 	if !strings.HasPrefix(pushKey, baseURL+"/") {
-		return nil, &errMatrix{pushKey: pushKey, err: errHTTPBadRequestMatrixPushkeyBaseURLMismatch}
+		return nil, &errMatrix{pushKey: pushKey, err: wrapErrHTTP(errHTTPBadRequestMatrixPushkeyBaseURLMismatch, "; received pushKey: %s, configured base url: %s", pushKey, baseURL)}
 	}
 	newRequest, err := http.NewRequest(http.MethodPost, pushKey, io.NopCloser(bytes.NewReader(body.PeekedBytes)))
 	if err != nil {