AlistGo/alist · error

response.String()

Error message

response.String()

What it means

Misskey's request helper treats any non-2xx HTTP response as an error whose text is the whole resty response (status plus body). Fires on auth failures, rate limits, or malformed requests to the Misskey API; the message is raw server output, not a curated message.

Solutions

  1. Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at drivers/misskey/util.go:43 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/19eeff9c5f26833e. Report an issue: GitHub.

Appendix: source

Thrown at drivers/misskey/util.go:43

	req.SetAuthToken(d.AccessToken).SetHeader("Content-Type", "application/json")

	if callback != nil {
		callback(req)
	} else {
		req.SetBody("{}")
	}

	req.SetResult(resp)

	// 启用调试模式
	req.EnableTrace()

	response, err := req.Execute(method, url)
	if err != nil {
		return err
	}
	if !response.IsSuccess() {
		return errors.New(response.String())
	}
	return nil
}

func (d *Misskey) getThumb(ctx context.Context, obj model.Obj) (io.Reader, error) {
	// TODO return the thumb of obj, optional
	return nil, errs.NotImplement
}

func setBody(body interface{}) base.ReqCallback {
	return func(req *resty.Request) {
		req.SetBody(body)
	}
}

func handleFolderId(dir model.Obj) interface{} {
	if isRootFolder(dir) {
		return nil // Root folder doesn't need folderId

View on GitHub (pinned to 843d9dc814)