Dokploy/dokploy · error · Error

Scaleway Secret Manager

Error message

Scaleway Secret Manager: ${reason} (status ${response.status}${detail ? `: ${detail}` : ""})

What it means

Generic failure thrown by the Scaleway Secret Manager request helper for any non-OK response other than a handled 404. It distinguishes authentication failures (401/403) from other request failures and appends the HTTP status plus any message parsed from the JSON error body.

Solutions

  1. Regenerate the Scaleway API token and update the vault config, then run testConnection
  2. Ensure the token's IAM policy grants secret_manager read access on the target project
  3. Check the status code in the message: 401/403 means credentials, otherwise inspect the detail body for rate limiting or server errors
  4. Verify region/project settings in the config
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight the token with a cheap authenticated call
const res = await fetch('https://api.scaleway.com/account/v1/projects', {
  headers: { 'X-Auth-Token': config.apiToken },
});
if (res.status === 401 || res.status === 403) throw new Error('Scaleway token invalid — rotate it');

Try / catch

try {
  await vault.testConnection();
} catch (e) {
  const m = e instanceof Error ? e.message : '';
  if (m.includes('authentication failed')) rotateToken();
  else if (m.includes('status 429')) await backoffAndRetry();
  else throw e;
}

Prevention

When it happens

Trigger: Any Scaleway API call where the token is invalid/expired (401/403), or the request fails with another status (e.g. 429 rate limit, 500, network-level proxy error surfaced as non-OK). Raised from request() called via response() or testConnection().

Common situations: Expired or revoked Scaleway API token; token lacking Secret Manager read permissions; wrong project/region causing 403; hitting Scaleway rate limits; mistyped access key.

Related errors


AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27). Data as JSON: /api/errors/3880c96f2d9b7e97. Report an issue: GitHub.

Appendix: source

Thrown at packages/server/src/utils/vault/scaleway.ts:65

	if (response.status === 404 && notFoundMessage) {
		throw new Error(`Scaleway Secret Manager: ${notFoundMessage}`);
	}

	let detail = "";
	try {
		const body = (await response.json()) as {
			message?: string;
			error?: string;
		};
		detail = body.message ?? body.error ?? "";
	} catch {}

	const reason =
		response.status === 401 || response.status === 403
			? "authentication failed"
			: "request failed";
	throw new Error(
		`Scaleway Secret Manager: ${reason} (status ${response.status}${detail ? `: ${detail}` : ""})`,
	);
};

const accessSecret = async (
	config: ScalewayConfig,
	secretPath: string,
	secretName: string,
) => {
	const response = await request(
		config,
		`/secrets-by-path/versions/${REVISION}/access`,
		{
			project_id: config.projectId,
			secret_name: secretName,
			secret_path: secretPath,
		},
		`secret "${secretName}" not found in path "${secretPath}"`,

View on GitHub (pinned to 546686ea35)