gildas-lormeau/SingleFile · error · Error

unknown_error

unknown_error

Error message

unknown_error (" + httpResponse.status + ")

What it means

getResponse is the central HTTP status gate for Dropbox calls: 200 passes, 401 throws 'invalid_token', and everything else throws 'unknown_error (<status>)'. Callers of any Dropbox HTTP request (list, append, getJSON) hit this for any non-200/401 status.

Source

Thrown at src/lib/dropbox/dropbox.js:348

}

async function getJSON(httpResponse) {
	httpResponse = getResponse(httpResponse);
	const response = await httpResponse.json();
	if (response.error) {
		throw new Error(response.error);
	} else {
		return response;
	}
}

function getResponse(httpResponse) {
	if (httpResponse.status == 200) {
		return httpResponse;
	} else if (httpResponse.status == 401) {
		throw new Error("invalid_token");
	} else {
		throw new Error("unknown_error (" + httpResponse.status + ")");
	}
}

function stringify(value) {
	return JSON.stringify(value).replace(ENCODED_CHARS,
		function (c) {
			return "\\u" + ("000" + c.charCodeAt(0).toString(16)).slice(-4);
		}
	);
}

View on GitHub (pinned to 517fb7c5cf)

Solutions

  1. Read the status from the message: 429 → retry with exponential backoff honoring rate-limit headers; 5xx → retry later.
  2. Re-authenticate if auth-related (though 401 is mapped to invalid_token instead).
  3. Verify app scopes/permissions on the Dropbox app console for 403s.
  4. Check Dropbox system status and network/proxy configuration.

Example fix

// before
const resp = await dropbox.listFiles(path); // throws unknown_error (429)
// after
try {
  const resp = await dropbox.listFiles(path);
} catch (e) {
  if (e.message === 'unknown_error (429)') {
    await sleep(2000);
    return dropbox.listFiles(path);
  }
  throw e;
}
Defensive patterns

Strategy: retry

Try / catch

try {
  await dropboxCall(...);
} catch (e) {
  if (e.message === 'invalid_token') {
    await reauthorize();
  } else {
    const m = e.message.match(/unknown_error \((\d+)\)/);
    if (m && (m[1] === '429' || m[1].startsWith('5'))) {
      await sleep(backoff);
      return dropboxCall(...);
    }
    throw e;
  }
}

Prevention

When it happens

Trigger: Dropbox API returning 429 (rate limit), 409 (conflict), 5xx (server error), or 403 on any request routed through getResponse.

Common situations: Hitting Dropbox rate limits during bulk uploads/downloads; Dropbox incidents returning 5xx; revoked app permission returning 403; proxy interference returning unexpected statuses.

Related errors


AI-assisted analysis of gildas-lormeau/SingleFile@517fb7c5cf (2026-09-01). Data as JSON: /api/errors/d12a4cb33ca8b855. Report an issue: GitHub.