siyuan-note/siyuan · warning

model.Conf.Language(34)

Error message

model.Conf.Language(34)

What it means

The WebDAV handler in serve.go rejects write-method requests (MKCOL, COPY, MOVE, LOCK, UNLOCK, PROPPATCH) with HTTP 403 and this error message, which is the localized i18n string at key 34 ("do not support"-style access-denied message from model.Conf.Language). WebDAV write operations are not supported for this endpoint.

Solutions

  1. Use only read methods (GET, PROPFIND) against this endpoint
  2. Use the SiYuan sync feature or HTTP API instead of WebDAV write operations
  3. Check i18n key 34 in appearance/langs to see the exact user-facing message
Defensive patterns

Strategy: fallback

Validate before calling

const READONLY_METHODS = new Set(["GET","HEAD","PROPFIND","OPTIONS","REPORT"]);
if (!READONLY_METHODS.has(method)) return fallbackToHttpApi(request);

Try / catch

try {
  await webdavRequest(method, url);
} catch (e) {
  if (e.status === 403) return useSiYuanHttpApiInstead(e);
  throw e;
}

Prevention

When it happens

Trigger: Sending any of the write methods MKCOL/COPY/MOVE/LOCK/UNLOCK/PROPPATCH to the WebDAV endpoint mounted at this route while the request passes auth.

Common situations: Desktop OS WebDAV clients or sync tools (e.g. Windows WebDAV mount, third-party sync apps) that attempt to create directories, move files, or lock resources on the SiYuan WebDAV share.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/4460f0ba22d8a833. Report an issue: GitHub.

Appendix: source

Thrown at kernel/server/serve.go:2078

			// logging.LogDebugf("WebDAV [%s %s]", r.Method, r.URL.String())
		},
	}

	ginGroup := ginServer.Group("/webdav", model.CheckAuth, model.CheckAdminRole)
	// ginGroup.Any NOT support extension methods (PROPFIND etc.)
	ginGroup.Match(WebDavMethods, "/*path", func(c *gin.Context) {
		if util.ReadOnly {
			switch c.Request.Method {
			case http.MethodPost,
				http.MethodPut,
				http.MethodDelete,
				MethodMkCol,
				MethodCopy,
				MethodMove,
				MethodLock,
				MethodUnlock,
				MethodPropPatch:
				c.AbortWithError(http.StatusForbidden, errors.New(model.Conf.Language(34)))
				return
			}
		}
		handler.ServeHTTP(c.Writer, c.Request)
	})
}

func serveCalDAV(ginServer *gin.Engine) {
	// REF: https://github.com/emersion/hydroxide/blob/master/carddav/carddav.go
	handler := caldav.Handler{
		Backend: &model.CalDavBackend{},
		Prefix:  model.CalDavPrincipalsPath,
	}

	ginServer.Match(CalDavMethods, "/.well-known/caldav", func(c *gin.Context) {
		// logging.LogDebugf("CalDAV -> [%s] %s", c.Request.Method, c.Request.URL.String())
		handler.ServeHTTP(c.Writer, c.Request)
	})

View on GitHub (pinned to 9f775e8a12)